about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
AgeCommit message (Collapse)AuthorLines
2019-10-15minimize the rust-std componentJosh Stone-0/+1
This splits out a rustc-dev component with the compiler crates, and keeps the status quo of default installed files on nightly. The default changing to not install compiler libraries by default is left for a future pull request. However, on stable and beta, this does remove the compiler libraries from the set of libraries installed by default, as they are never needed there (per our stability story, they "cannot" be used).
2019-10-12Revert "Auto merge of #64823 - cuviper:min-std, r=Mark-Simulacrum"Mark Rousskov-1/+0
This reverts commit 000d90b11f7be70ffb7812680f7abc6deb52ec88, reversing changes made to 898f36c83cc28d7921a1d7b3605323dc5cfcf533.
2019-10-10Auto merge of #64823 - cuviper:min-std, r=Mark-Simulacrumbors-0/+1
minimize the rust-std component This changes the `rust-std` dist component to only include the artifacts of compiling the `libstd` step, as listed in `.libstd.stamp`. This does include `test` and `proc-macro` as well. The remaining _unstable_ libraries that are built as part of `rustc` are packaged into a new `rustc-dev` component, intended for use in the development of closely related tools (clippy, miri, rls). Here are the component sizes from the [try build](https://dev-static.rust-lang.org/dist/2019-10-07/index.html): | Name | Size | --- | --- | rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz | 23.94 MiB | rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz | 17.4 MiB | rustc-dev-nightly-x86_64-unknown-linux-gnu.tar.gz | 182.03 MiB | rustc-dev-nightly-x86_64-unknown-linux-gnu.tar.xz | 157.91 MiB Fixes #61978 Fixes #62486
2019-10-10Auto merge of #65129 - andjo403:cargo_args, r=alexcrichtonbors-0/+10
make it possible to add args to cargo in x.py eg. make it easier to test -Ztimings for rustc cc https://github.com/rust-lang/rust/issues/65088
2019-10-09make it possible to add args to cargo in x.pyAndreas Jonson-0/+10
eg. make it easier to test -Ztimings for rustc
2019-10-07add dist::RustcDev for unstable compiler librariesJosh Stone-1/+1
2019-10-07[WIP] minimize the rust-std componentJosh Stone-0/+1
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-1/+0
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Fix ABI, run and fix more tests, re-enable CI for PRsThomas Lively-0/+1
2019-09-23rustbuild: Pass `-Zsave-analysis` during testsAlex Crichton-2/+1
This is needed to ensure that the crates during a normal build are shared with the crates during testing, otherwise they'll end up hasing differently and we'll recompile crates like `core` during tests.
2019-09-23No need to remove target-specific RUSTFLAGSAlex Crichton-5/+3
Turns out Cargo favors RUSTFLAGS!
2019-09-23Stylistic changesAlex Crichton-13/+7
2019-09-23Move handling of `-Cprefer-dynamic` into `builder.rs`Alex Crichton-0/+10
This logic is *super* old and can be tweaked and moved into `builder.rs`
2019-09-23Move `--cfg bootstrap` out of `rustc.rs`Alex Crichton-0/+1
Instead let's do this via `RUSTFLAGS` in `builder.rs`. Currently requires a submodule update of `stdarch` to fix a problem with previous compilers.
2019-09-23Move handling of `{MUSL,WASI}_ROOT` to `compile.rs`Alex Crichton-0/+5
No longer any need for them to live in `rustc.rs`!
2019-09-23Allow adding `RUSTFLAGS` after `Builder::cargo`Alex Crichton-6/+43
This commit changes the return type of `Builder::cargo` to return a builder that allows dynamically adding more `RUSTFLAGS` values after-the-fact. While not used yet, this will later be used to delete more of `rustc.rs`
2019-09-23Move debuginfo level handling to `builder.rs`Alex Crichton-1/+1
2019-09-23Move handling of `codegen-units` to `builder.rs`Alex Crichton-2/+12
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