about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-02-10rustc: doc commentsAlexander Regueiro-9/+9
2019-02-01Auto merge of #57937 - denzp:nvptx, r=nagisabors-0/+1
NVPTX target specification This change adds a built-in `nvptx64-nvidia-cuda` GPGPU no-std target specification and a basic PTX assembly smoke tests. The approach is taken here and the target spec is based on `ptx-linker`, a project started about 1.5 years ago. Key feature: bitcode object files being linked with LTO into the final module on the linker's side. Prior to this change, the linker used a `ld` linker-flavor, but I think, having the special CLI convention is a more reliable way. Questions about further progress on reliable CUDA workflow with Rust: 1. Is it possible to create a test suite `codegen-asm` to verify end-to-end integration with LLVM backend? 1. How would it be better to organise no-std `compile-fail` tests: add `#![no_std]` where possible and mark others as `ignore-nvptx` directive, or alternatively, introduce `compile-fail-no-std` test suite? 1. Can we have the `ptx-linker` eventually be integrated as `rls` or `clippy`? Hopefully, this should allow to statically link against LLVM used in Rust and get rid of the [current hacky solution](https://github.com/denzp/rustc-llvm-proxy). 1. Am I missing some methods from `rustc_codegen_ssa::back::linker::Linker` that can be useful for bitcode-only linking? Currently, there are no major public CUDA projects written in Rust I'm aware of, but I'm expecting to have a built-in target will create a solid foundation for further experiments and awesome crates. Related to #38789 Fixes #38787 Fixes #38786
2019-01-27Auto merge of #57765 - Mark-Simulacrum:bootstrap-bump, r=alexcrichtonbors-1/+1
Bump bootstrap compiler to 1.33 beta r? @alexcrichton or @pietroalbini cc @rust-lang/release
2019-01-27Create `nvptx64-nvidia-cuda` target specificationDenys Zariaiev-0/+1
2019-01-26Bump bootstrap compiler to 1.33 betaMark Rousskov-1/+1
2019-01-25Correctly set filetime for copied LLVMMark Rousskov-4/+10
This also makes compiletest no longer always retest everything.
2019-01-08fixupOliver Scherer-0/+5
2019-01-08Prepare everything for distributing miri via rustupOliver Scherer-0/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-15Auto merge of #56600 - ljedrz:fix_edition, r=Mark-Simulacrumbors-7/+7
bootstrap: fix edition A byproduct of work on https://github.com/rust-lang/rust/pull/56595; done with `cargo fix --edition`.
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-4/+4
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-10bootstrap: fix editionljedrz-7/+7
2018-12-08Auto merge of #56578 - alexreg:cosmetic-1, r=alexregbors-1/+1
Various minor/cosmetic improvements to code r? @Centril 😄
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-07use top level `fs` functions where appropriateAndy Russell-4/+2
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-11-29Rollup merge of #55391 - matthiaskrgr:bootstrap_cleanup, r=TimNNGuillaume Gomez-2/+2
bootstrap: clean up a few clippy findings remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
2018-11-06Auto merge of #55106 - petrhosek:fuchsia-lld, r=alexcrichtonbors-1/+2
Use lld directly for Fuchsia target Fuchsia already uses lld as the default linker, so there's no reason to always invoke it through Clang, instead we can simply invoke lld directly and pass the set of flags that matches Clang.
2018-11-05Use lld directly for Fuchsia targetPetr Hosek-1/+2
Fuchsia already uses lld as the default linker, so there's no reason to always invoke it through Clang, instead we can simply invoke lld directly and pass the set of flags that matches Clang.
2018-11-02Use `jemalloc-sys` on Linux and OSX compilersAlex Crichton-1/+5
This commit adds opt-in support to the compiler to link to `jemalloc` in the compiler. When activated the compiler will depend on `jemalloc-sys`, instruct jemalloc to unprefix its symbols, and then link to it. The feature is activated by default on Linux/OSX compilers for x86_64/i686 platforms, and it's not enabled anywhere else for now. We may be able to opt-in other platforms in the future! Also note that the opt-in only happens on CI, it's otherwise unconditionally turned off by default. Closes #36963
2018-11-02Remove all jemalloc-related contentAlex Crichton-12/+2
This commit removes all jemalloc related submodules, configuration, etc, from the bootstrap, from the standard library, and from the compiler. This will be followed up with a change to use jemalloc specifically as part of rustc on blessed platforms.
2018-10-27bootstrap: be more explicit on what we collect into. NFCMatthias Krüger-2/+2
2018-10-26Rollup merge of #55391 - matthiaskrgr:bootstrap_cleanup, r=oli-obkkennytm-4/+4
bootstrap: clean up a few clippy findings remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
2018-10-26bootstrap: clean up a few clippy findingsMatthias Krüger-4/+4
remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
2018-10-25rustbuild: fix remap-debuginfo when building a releaseMarc-Antoine Perennou-1/+1
Fallback to the release number as we can't get the git commit sha as we're not in a git repository. Fixes #55341 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-10-20Update Cargo, build curl/OpenSSL statically via featuresAlex Crichton-19/+0
In addition to to updating Cargo's submodule and Cargo's dependencies, this also updates Cargo's build to build OpenSSL statically into Cargo as well as libcurl unconditionally. This removes OpenSSL build logic from the bootstrap code, and otherwise requests that even on OSX we build curl statically.
2018-10-13boostrap: dist: if a file cannot be installed because it does not exist, ↵Matthias Krüger-0/+3
print its name in the error message.
2018-10-08Run debuginfo tests against rust-enabled lldb, when possibleTom Tromey-6/+0
If the rust-enabled lldb was built, then use it when running the debuginfo tests. Updating the lldb submodule was necessary as this needed a way to differentiate the rust-enabled lldb, so I added a line to the --version output. This adds compiletest commands to differentiate between the rust-enabled and non-rust-enabled lldb, as is already done for gdb. A new "rust-lldb" header directive is also added, but not used in this patch; I plan to use it in #54004. This updates all the tests.
2018-09-25Improvements to finding LLVM's FileCheckTom Tromey-2/+21
This patch adds a few improvements to how the build system finds LLVM's FileCheck program. * On Fedora, the system LLVM installs FileCheck in the "llvm" subdirectory of the LLVM libdir. This patch teaches the build system to look there. * This adds a configure option to specify which llvm-config executable to use. This is handy on systems that can parallel install multiple versions of LLVM; for example I can now: ./configure --llvm-config=/bin/llvm-config-5.0-64 ... to build against LLVM 5, rather than whatever the default llvm-config might be. * Finally, this adds a configure- and config.toml- option to set the path to FileCheck. This is handy when building against an LLVM where FileCheck was not installed. This happens on compatibility installs of LLVM on Fedora.
2018-09-17Auto merge of #52036 - collin5:b50509-2, r=collin5bors-0/+2
Clean up dependency tracking in Rustbuild [2/2] Make `clear_if_dirty` calls in `Builder::cargo` with stamp dependencies for the given Mode. Continuation of #50904 Ref issue #50509 r? @Mark-Simulacrum
2018-09-12remove struct CleanToolsCollins Abitekaniza-0/+2
2018-09-10Add rustc SHA to released DWARF debuginfoAlex Crichton-1/+31
This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
2018-08-30Rollup merge of #53740 - japaric:readobj, r=alexcrichtonPietro Albini-0/+1
add llvm-readobj to llvm-tools-preview Similar to readelf but supports more object formats (it seems). Particularly useful to inspect in detail sections (e.g. their flags) and symbols (e.g. their types). r? @alexcrichton cc @dvc94ch
2018-08-29bootstrap: Link LLVM tools dynamically in order to save time in ThinLTO builds.Michael Woerister-0/+4
2018-08-28sortJorge Aparicio-1/+1
2018-08-27add llvm-readobj to llvm-tools-previewJorge Aparicio-0/+1
2018-08-20bootstrap: Allow to specify ranlib tool used when compiling C++ code.Michael Woerister-0/+7
2018-08-14Add lldb to the buildTom Tromey-13/+30
This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-08-06Building librustc_codegen_llvm in a separate directoryMark Rousskov-1/+1
This allows clearing it out and building it separately from the compiler. Since it's essentially a different and separate crate this makes sense to do, each cargo invocation should generally happen in its own directory.
2018-07-14Rollup merge of #51962 - crlf0710:patch-2, r=alexcrichtonkennytm-1/+2
Provide llvm-strip in llvm-tools component Shipping this tool gives people reliable way to reduce the generated executable size. I'm not sure if this strip tool is available from the llvm version current rust is built on. But let's take a look. @japaric
2018-07-10Restore #![deny(warnings)]ljedrz-0/+1
2018-07-10Deny bare trait objects in `src/bootstrap`.ljedrz-3/+3
2018-07-06Auto merge of #51757 - nielx:fix/haiku-fixes, r=nagisabors-2/+2
Haiku: several smaller fixes to build and run rust on Haiku This PR combines three small patches that help Rust build and run on the Haiku platform. These patches do not intend to impact other platforms.
2018-07-06Rollup merge of #52080 - oli-obk:dep_dedup_diagnostics, r=kennytmkennytm-0/+1
Improve dependency deduplication diagnostics r? @kennytm this is obviously hard to test :laughing: cc #52072
2018-07-05Address review commentsOliver Schneider-0/+1
2018-07-05Update Cargo.lock dependenciesAlex Crichton-1/+3
Run `cargo update` and let's see how far we can get!
2018-07-03Compile stage0 tools with the raw bootstrap compilerAlex Crichton-6/+17
This commit updates the stage0 build of tools to use the libraries of the stage0 compiler instead of the compiled libraries by the stage0 compiler. This should enable us to avoid any stage0 hacks (like missing SIMD).
2018-07-01Provide llvm-strip in llvm-tools componentCrLF0710-1/+2
Shipping this tool gives people reliable way to reduce the generated executable size. I'm not sure if this strip tool is available from the llvm version current rust is built on. But let's take a look. @japaric
2018-07-01Did you mean to block nightlies on clippy?Oliver Schneider-0/+8
2018-06-24Haiku: there is no setpriority on this platform.Niels Sascha Reedijk-2/+2
2018-06-23build: add llvm-tools to manifestBrad Campbell-17/+4
This commit expands on a previous commit to build llvm-tools as a rustup component. It causes the llvm-tools component to be built if the extended step is active. It also adds llvm-tools to the build manifest so rustup can find it.