about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
AgeCommit message (Collapse)AuthorLines
2019-09-23Move handling of internal lints to `build.rs`Alex Crichton-0/+8
2019-09-23Move handling of some warnings to `builder.rs`Alex Crichton-2/+10
2019-09-23Move handling of `-Dwarnings` to `builder.rs`Alex Crichton-2/+2
2019-09-23bootstrap: Remove need for `RUSTC_RPATH` variableAlex Crichton-1/+48
2019-09-23bootstrap: Handle target-specific cargo env varsAlex Crichton-2/+12
This commit ensure that we handle target-specific env vars for RUSTFLAGS through Cargo as well.
2019-09-23bootstrap: Move `RUSTC_CRT_STATIC` to `builder.rs`Alex Crichton-1/+5
2019-09-23bootstrap: Remove need for RUSTC_SAVE_ANALYSISAlex Crichton-17/+20
2019-09-23bootstrap: Remove usage of `RUSTC_TARGET_LINKER`Alex Crichton-1/+2
Cargo has a native enviroment variable for this.
2019-09-23bootstrap: Move `-Zdual-proc-macros` to `builder.rs`Alex Crichton-1/+1
2019-09-23bootstrap: Move `-Zexternal-macro-backtrace` to builderAlex Crichton-0/+2
No need for this to be in `rustc.rs`
2019-09-23bootstrap: Move `RUSTC_BREAK_ON_ICE` out of shimAlex Crichton-1/+2
This is always set, so let's just always set it elsewhere to reduce the need for our `rustc.rs` shim.
2019-09-23bootstrap: Delete handling of `RUSTC_METADATA_SUFFIX`Alex Crichton-18/+0
This is already handled by `__CARGO_DEFAULT_LIB_METADATA` so there's no need to doubly do it.
2019-09-23bootstrap: Add a helper for managing RUSTFLAGSAlex Crichton-17/+34
Most of `bootstrap/bin/rustc.rs` doesn't need to exist with the advent of `RUSTFLAGS` (yes this is super old) so this starts by refactoring a bit to make it easier locally in the `Builder::cargo` method to append to `RUSTFLAGS` that gets down to rustc.
2019-09-10Locate rustc binary similarly to codegen backend loadingMark Rousskov-0/+2
This ensures that the failure cases for finding the codegen backend and for finding the rustc binary are essentially the same, and since we almost always will load the codegen backend, this is essentially meaning that the rustc change is not a regression.
2019-08-23bootstrap: Merge the libtest build step with libstdAlex Crichton-9/+3
Since its inception rustbuild has always worked in three stages: one for libstd, one for libtest, and one for rustc. These three stages were architected around crates.io dependencies, where rustc wants to depend on crates.io crates but said crates don't explicitly depend on libstd, requiring a sysroot assembly step in the middle. This same logic was applied for libtest where libtest wants to depend on crates.io crates (`getopts`) but `getopts` didn't say that it depended on std, so it needed `std` built ahead of time. Lots of time has passed since the inception of rustbuild, however, and we've since gotten to the point where even `std` itself is depending on crates.io crates (albeit with some wonky configuration). This commit applies the same logic to the two dependencies that the `test` crate pulls in from crates.io, `getopts` and `unicode-width`. Over the many years since rustbuild's inception `unicode-width` was the only dependency picked up by the `test` crate, so the extra configuration necessary to get crates building in this crate graph is unlikely to be too much of a burden on developers. After this patch it means that there are now only two build phasese of rustbuild, one for libstd and one for rustc. The libtest/libproc_macro build phase is all lumped into one now with `std`. This was originally motivated by rust-lang/cargo#7216 where Cargo was having to deal with synthesizing dependency edges but this commit makes them explicit in this repository.
2019-08-21Run Clippy without json-rendered flagMateusz Mikuła-2/+1
2019-08-20Auto merge of #63752 - Centril:rollup-nlxwety, r=Centrilbors-7/+13
Rollup of 4 pull requests Successful merges: - #62497 (Fix double resolving custom libdir) - #63209 (Stabilize `async_await` in Rust 1.39.0) - #63746 (Cherry-pick src/test changes with Centril's changes) - #63750 (rustc_metadata: replace LazySeq<T> with Lazy<[T]>.) Failed merges: r? @ghost
2019-08-20Rollup merge of #62497 - o01eg:fix-62496, r=alexcrichtonMazdak Farrokhzad-7/+13
Fix double resolving custom libdir Fixes #62496 Related issue is https://bugs.gentoo.org/672816
2019-08-19Don't use stage naming in RUSTFLAGS environment variablesMark Rousskov-5/+5
This patch supports less behavior than before, since specifiying stage 1 vs stage 2 is no longer possible, but that is presumably a somewhat rare use case anyway, so not supporting it seems acceptable (and it can be readded easily if desired).
2019-08-16Auto merge of #63470 - Mark-Simulacrum:rustc-depdep, r=alexcrichtonbors-65/+22
Utilize -Zbinary-dep-depinfo in rustbuild We no longer utilize stamp-file mtimes at all inside rustbuild, and a future PR may be able to entirely eliminate them by eagerly copying to the appropriate sysroot. The only mtime-based dependency tracking left is for documentation because we lie to Cargo about the rustdoc binary, so Cargo does not track changes to the real binary, and codegen-backends because binary-dep-depinfo does not emit that information into the depfiles. Both of these are fixable in the longer term but this existing patch gives us the following benefits: * We no longer delete Cargo target directories manually within a stage. Cross-stage, changes to codegen backends will still clear out target directories. This means that incremental state persists across individual steps (e.g., rebuilding libstd does not clear out librustc incremental state). Fixes #54712. * Dependency tracking across steps within a given stage is now fully precise. We will not clear out all codegen backend dependencies due to changes in librustc_driver, for example, only deleting the final librustc_codegen_llvm crate. Fixes #54008, fixes #50481. * We properly track codegen backends as a dependency (equivalent to rustc) across changes. Fixes #53284, and fixes #52719. * Cross-stage dependency tracking of crates is also much more accurate and reliable. Most likely fixes #49979 (but no reproduction steps in that issue). Fixes #59105. cc #63012
2019-08-14Update error-format to match new Cargo flags for pipeliningAlex Crichton-3/+0
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-1/+1
2019-08-13Utilize -Zbinary-dep-depinfo for dependency trackingMark Rousskov-65/+22
2019-08-08remove test-miri flag from bootstrapRalf Jung-9/+0
2019-08-08bootstrap: get rid of TEST_MIRI env varRalf Jung-1/+0
2019-08-07Fix double resolving custom libdirO01eg-7/+13
2019-07-27Remove run-pass test suitesVadim Petrochenkov-3/+0
2019-07-06add ./x.py test src/doc/rustc-guideAndré Luis Leal Cardoso Junior-0/+1
2019-06-16Separate bootstrap modulechansuke-658/+1
2019-06-13Remove unnecessary Std dependencyMark Rousskov-4/+0
2019-06-12rustbuild: fix libtest_stampMarc-Antoine Perennou-1/+1
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2019-06-07Clarify when we run steps with ONLY_HOSTSMark Rousskov-5/+5
2019-05-30Auto merge of #61212 - alexcrichton:skip-rustc, r=pietroalbinibors-51/+82
ci: Attempt to skip a full rustc compile on dist* Currently when we're preparing cross-compiled compilers it can take quite some time because we have to build the compiler itself three different times. The first is the normal bootstrap, the second is a second build for the build platform, and the third is the actual target architecture compiler. The second compiler was historically built exclusively for procedural macros, and long ago we didn't actually need it. This commit tries out avoiding that second compiled compiler, meaning we only compile rustc for the build platform only once. Some local testing shows that this is promising, but bors is of course the ultimate test!
2019-05-28Fixup styleAlex Crichton-1/+6
2019-05-28rustbuild: Assert extended builds don't dist too muchAlex Crichton-13/+14
This extends a test in the previous commit to assert that we don't build extra rustc compilers even when the "extended" option is set to true. This involved some internal refactoring to have more judicious usage of `compiler_for`, added in the previous commit, as well. Various `dist::*` targets were refactored to be parameterized with a `Compiler` instead of a `stage`/`host`, and then the various parameters within the `Extended` target were tweaked to ensure that we don't ever accidentally ask for a stage2 build compiler when we're distributing something.
2019-05-28rustbuild: Tweak how stage1 compilers are selectedAlex Crichton-38/+63
This commit furthers the previous one to ensure that we don't build an extra stage of the compiler in CI. A test has been added to rustbuild to ensure that this doesn't regress, and then in debugging this test it was hunted down that the `dist::Std` target was the one erroneously pulling in the wrong compiler. The `dist::Std` step was updated to instead account for the "full bootstrap" or not flag, ensuring that the correct compiler for compiling the final standard library was used. This was another use of the `force_use_stage1` function which was in theory supposed to be pretty central, so existing users were all evaluated and a new function, `Builder::compiler_for`, was introduced. All existing users of `force_use_stage1` have been updated to use `compiler_for`, where the semantics of `compiler_for` are similar to that of `compiler` except that it doesn't guarantee the presence of a sysroot for the arguments passed (as they may be modified). Perhaps one day we can unify `compiler` and `compiler_for`, but the usage of `Builder::compiler` is so ubiquitous it would take quite some time to evaluate whether each one needs the sysroot or not, so it's hoped that can be done in parallel.
2019-05-25Add clippy and fix commands to x.pyljedrz-8/+17
2019-05-24rustbuild: Simplify debuginfo configurationVadim Petrochenkov-16/+9
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-0/+4
2019-05-02Prevent dependencies between std/test/rustc unifying with each othervarkor-4/+20
2019-03-31Fix custom relative libdir.O01eg-1/+22
Uses relative libdir to place libraries on all stages. Adds verbose installation output.
2019-03-29Rollup merge of #59366 - ehuss:update-books, r=QuietMisdreavusMazdak Farrokhzad-0/+1
Update books Update reference, book, rust-by-example, edition-guide, embedded-book ## reference 15 commits in 41493ffce5d0e17d54eaf5ec9a995054e2b9aece..27ad493a10364e907ec476e2ad61e8a1614b57e1 2019-03-05 12:32:22 +0100 to 2019-03-26 02:06:15 +0100 - Document wasm_import_module for #[link]. (rust-lang-nursery/reference#554) - Fix tidy error. (rust-lang-nursery/reference#552) - Some minor contributing updates. (rust-lang-nursery/reference#551) - Document `type_length_limit`. (rust-lang-nursery/reference#546) - Add some terms to the glossary. (rust-lang-nursery/reference#547) - Document `target_feature` and `cfg_target_feature`. (rust-lang-nursery/reference#545) - Remove undocumented page (rust-lang-nursery/reference#539) - Reorg and update attributes (rust-lang-nursery/reference#537) - Fix some minor link errors. (rust-lang-nursery/reference#538) - Add linkchecker. (rust-lang-nursery/reference#521) - Expand docs on Macros By Example. (rust-lang-nursery/reference#511) - document #[panic_handler] (rust-lang-nursery/reference#362) - document #[used] (rust-lang-nursery/reference#361) - Note that UB is program-global (rust-lang-nursery/reference#490) - Fix copy-paste error in procedural-macros.md (rust-lang-nursery/reference#533) ## book 16 commits in 9cffbeabec3bcec42d09432bfe7705125c848889..b93ec30bbc7b1b5c2f44223249ab359bed2ed5a6 2019-03-02 08:22:41 -0500 to 2019-03-26 16:54:10 -0400 - Unignore example that now compiles - Fix code snippet (rust-lang/book#1863) - Fix mdbook link text in readme (rust-lang/book#1881) - Wrap to 80 cols - Make sentence more complete (rust-lang/book#1885) - consistenly use increment and decrement (rust-lang/book#1884) - Fix link to Reference's conditional-compilation. (rust-lang/book#1878) - Fix subject/verb agreement - Remove nostarch snapshot files that have been incorporated and checked - haha teach the dictionary steve's name - Add authorship info to the front page - fix accidental &lt;ol&gt;'s (rust-lang/book#1866) - Edits to Macros (rust-lang/book#1848) - Mention `lock` returns `MutexGuard` wrapped in a `LockResult` - Add an example that illustrates NLL (rust-lang/book#1842) - change the parameter name from `type` to `kind` (rust-lang/book#1845) ## rust-by-example 33 commits in 2ce92beabb912d417a7314d6da83ac9b50dc2afb..f68ef3d0f4959f6a7d92a08d9994b117f0f4d32d 2018-11-20 10:10:23 -0500 to 2019-03-12 15:32:12 -0300 - Fix some broken links. (rust-lang/rust-by-example#1161) - Update links in README (rust-lang/rust-by-example#1167) - Add score/lifetimes/trait.md (rust-lang/rust-by-example#1168) - Fix rust-lang/rust-by-example#1147 - No more `open_mode` method (rust-lang/rust-by-example#1164) - Fix for loop description in list print example (rust-lang/rust-by-example#1162) - Add link to Cargo chapter in the index page (rust-lang/rust-by-example#1159) - Fix grammar in sentence about integer notation (rust-lang/rust-by-example#1157) - Do not use deprecated functions from `std::error::Error` trait (rust-lang/rust-by-example#1151) - Update new_types.md to clarify conversion to base type (rust-lang/rust-by-example#1148) - Fix compatibility with Rust 2018 (rust-lang/rust-by-example#1150) - Hello: Fix hint link in `fmt` chapter. (rust-lang/rust-by-example#1146) - Clarify pub(restricted) example a bit (rust-lang/rust-by-example#1133) - Add "literal" to list of macro designators (rust-lang/rust-by-example#1153) - Minor fixes for the macros chapter (rust-lang/rust-by-example#1113) - Use new book links instead of the old second-edition ones (rust-lang/rust-by-example#1143) - Recommend implementing Display over ToString (rust-lang/rust-by-example#1145) - Remove unused import and format with `rustfmt` (rust-lang/rust-by-example#1144) - fix typo (rust-lang/rust-by-example#1142) - Update syntax for 2018 Edition (rust-lang/rust-by-example#1136) - Added two missing full stops (rust-lang/rust-by-example#1138) - Removed unnecessary spaces before macro designators in macros/dry (rust-lang/rust-by-example#1139) - fix install mdbook command (rust-lang/rust-by-example#1128) - Changed word `function` to `type` in comment of fn area (rust-lang/rust-by-example#1132) - Added two missing backticks in generics/multi_bounds (rust-lang/rust-by-example#1129) - Fixed small logic error in error/option_unwrap/and_then (rust-lang/rust-by-example#1127) - Fix typo (rust-lang/rust-by-example#1125) - The code of conduct link was dead. I fixed it. (rust-lang/rust-by-example#1122) - I added a space in the Display fmt for Complex (rust-lang/rust-by-example#1123) - Fix Rust install link in the index (rust-lang/rust-by-example#1124) - Update cargo conventions section (rust-lang/rust-by-example#1121) - Fixed curly braces in the `To and from Strings` chapter to be parentheses (rust-lang/rust-by-example#1120) - Edit a typo (rust-lang/rust-by-example#1119) - Fixes rust-lang/rust-by-example#1115 by correcting the typo from into_iterator to into_iter (rust-lang/rust-by-example#1118) ## edition-guide 1 commits in aa0022c875907886cae8f3ef8e9ebf6e2a5e728d..b56ddb11548450a6df4edd1ed571b2bc304eb9e6 2019-02-27 22:10:39 -0800 to 2019-03-10 10:23:16 +0100 - Links fixes (rust-lang-nursery/edition-guide#133) ## embedded-book 6 commits in 9e656ead82bfe869493dec82653a52e27fa6a05c..07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a 2019-03-03 16:03:26 +0000 to 2019-03-27 15:40:52 +0000 - Fix test errors. (rust-embedded/book#180) - Update qemu.md (rust-embedded/book#170) - Update no-std.md to remove obsolete FAQ link (rust-embedded/book#177) - We've come a long way :) (rust-embedded/book#176) - Correct link to team (rust-embedded/book#175) - Update some book links to their new homes. (rust-embedded/book#173)
2019-03-27Update booksEric Huss-0/+1
2019-03-25Fix two bootstrap testsPhilipp Hansch-0/+2
2019-03-20Auto merge of #58897 - Mark-Simulacrum:tool-rework, r=alexcrichtonbors-8/+7
Rework how bootstrap tools are built This makes bootstrap tools buildable and testable in stage 0 with the downloaded bootstrap compiler, futhermore, it makes it such that they cannot be built in any other stage. Notably, this will also mean that compiletest may need to wait a cycle before it can use changes to `libtest`, as it no longer depends on the in-tree libtest.
2019-03-20Auto merge of #58791 - denzp:asm-compile-tests, r=alexcrichtonbors-0/+1
Introduce assembly tests suite The change introduces a new test suite - **Assembly** tests. The motivation behind this is an ability to perform end-to-end codegen testing with LLVM backend. Turned out, NVPTX backend sometimes missing common Rust features (`i128` and libcalls in the past, and still full atomics support) due to different reasons. Prior to this change, basic NVPTX assembly tests were implemented within `run-make` suite. Now, it's easier to write additional and maintain existing tests for the target. cc @gnzlbg @peterhj cc @eddyb I adjusted mangling scheme expectation, so there is no need to change the tests for #57967
2019-03-18Auto merge of #58847 - bjorn3:remove_metadata_only_cg, r=alexcrichtonbors-4/+1
Remove metadata only codegen backend It is unused and probably broken at the moment.
2019-03-16Merge remote-tracking branch 'upstream/master' into asm-compile-testsDenys Zariaiev-2/+2
2019-03-16[bootstrap] Remove llvm.enabled configbjorn3-4/+1
2019-03-14Run RustdocUi earlierJohn Kåre Alsaker-1/+1