about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-11-02merge JsonStd and Std stepsviandoxdev-58/+34
2022-11-01Rollup merge of #103781 - JakobDegen:mir-opt-tidy, r=jyn514Manish Goregaokar-0/+2
Detect unused files in `src/test/mir-opt` and error on them in tidy. Closes #97564 . Determining which files are generated by a given mir opt test is somewhat difficult. Because of this, we extract the logic for doing it out into a common crate that both compiletest and tidy can depend on. This avoids making compiletest a dependency of tidy which would negatively impact compile times for tidy. Testing for this is that it catches 5 files that violated this lint (and removes them).
2022-11-01fix json running all the timeviandoxdev-2/+7
2022-11-01Fixes #103816 make --json workviandoxdev-1/+2
2022-11-01Change the way libunwind is linked for `*-windows-gnullvm` targetsMateusz Mikuła-1/+0
2022-10-31Detect unused files in `src/test/mir-opt` and error on them in tidy.Jakob Degen-0/+2
2022-11-01Rollup merge of #103805 - Mark-Simulacrum:forward-port, r=jyn514Yuki Okushi-0/+3
Enable RUSTC_BOOTSTRAP for a few steps This forward-ports this commit so we don't need to keep applying it when branching beta (as done in 1.64, 1.65, and 1.66 beta bumps).
2022-10-31Auto merge of #102950 - oli-obk:check_miri, r=RalfJungbors-53/+24
Enable `x.py check` for miri Now that the miri subtree is working properly, let's add it to x.py check. cc `@rust-lang/miri`
2022-10-31Enable RUSTC_BOOTSTRAP for a few stepsMark Rousskov-0/+3
2022-10-31Rollup merge of #103732 - Mark-Simulacrum:revert-compiler-builtins, r=jyn514Dylan DPC-29/+22
Revert "Make the `c` feature for `compiler-builtins` opt-in instead of inferred" This reverts commit 3acb505ee560770c62bad5362f6caf7567d467b9 (PR #101833). The changes in this commit caused several bugs/incompatibilities (https://github.com/rust-lang/rust/pull/101833#issuecomment-1270191721, https://github.com/rust-lang/rust/issues/102560). For now we're reverting this commit and will re-land it alongside fixes for those bugs. Re-opens #101172 cc #102560 cc #102579
2022-10-30Rollup merge of #102101 - BelovDV:new-check-lld-version, r=petrochenkovMichael Howell-9/+22
check lld version to choose correct option to disable multi-threading in tests Testing compiler with 'use-lld = true' may be incorrect with old lld. Flag, disabling multi-threading, should consider lld version. r? ``@petrochenkov``
2022-10-30skip bootstrap target sanity checks when testing MiriRalf Jung-0/+10
2022-10-29Revert "Make the `c` feature for `compiler-builtins` opt-in instead of inferred"Mark Rousskov-29/+22
This reverts commit 3acb505ee560770c62bad5362f6caf7567d467b9 (PR #101833). The changes in this commit caused several bugs or at least incompatibilies. For now we're reverting this commit and will re-land it alongside fixes for those bugs.
2022-10-29Rollup merge of #102634 - andrewpollack:refactor-test-rustcflags, ↵Guillaume Gomez-3/+7
r=Mark-Simulacrum compiletest: Refactor test rustcflags Refactoring `host-rustcflags` and `target-rustcflags` from `Option<String>` to `Vec<String>` Ref: #102438 r? `@Mark-Simulacrum`
2022-10-26Rollup merge of #102706 - ferrocene:pa-ignore-doc-index, r=jyn514Dylan DPC-18/+48
Support excluding the generation of the standalone docs For Ferrocene we need to exclude the generation of the standalone docs (which include the index page, which we want to replace with our own), but with the way bootstrap is currently implemented that proved not possible. This PR aims to support that. The first problem is that the `doc::Standalone` step did two things: it generated the "standalone" documentation (which includes the index page and all the pages at the root of the documentation tree), but it also generated some files like `rust.css` and `version_info.html` that other step like `doc::TheBook` required. This meant generating the book required generating the index page, which made disabling the index page generation problematic. The approach I took to fix the first problem is to split the step into `doc::Standalone` and `doc::SharedAssets`, with `doc::TheBook` now depending on `doc::SharedAssets`. The second problem is that disabling the `doc::Standalone` proved to be tricky due to its path, `src/doc`. The path is accurate, as the source files for that step are `src/doc/*.md`. The problem is, bootstrap treats `--exclude` as a *suffix*, and so it also excluded the Cargo book whose source lives at `src/tools/cargo/src/doc`. The approach I took to fix the second problem is to add the `standalone` path in addition to `src/doc`, so that you can pass `--exclude standalone`. I'm not fully happy with the solution, and the other idea I had was to just move the standalone docs source code to `src/doc/standalone`. I feel that second approach is cleaner, but also requires more changes and might require more consensus. This PR is best reviewed commit-by-commit. r? `@jyn514`
2022-10-26Add cargo miri to x.py checkOli Scherer-0/+2
2022-10-26check lld version to choose correct flag for testsDaniil Belov-9/+22
2022-10-25Auto merge of #103392 - RalfJung:miri, r=oli-obkbors-5/+49
update Miri I had to use a hacked version of josh to create this, so let's be careful with merging this and maybe wait a bit to see if the josh issue becomes more clear. But the history looks good to me, we are not adding duplicates of rustc commits that were previously mirrored to Miri. Also I want to add some cross-testing of Miri in x.py.
2022-10-24use the shared assets step for building std tooPietro Albini-1/+2
2022-10-24also smoke-test 'cargo miri test'Ralf Jung-2/+36
2022-10-24add support for testing Miri on other targets, and do some cross-testing on CIRalf Jung-3/+13
2022-10-23Rollup merge of #103347 - RalfJung:rustc-src, r=Mark-SimulacrumMichael Howell-0/+14
bootstrap: also create rustc-src component in sysroot Fixes https://github.com/rust-lang/rust-analyzer/issues/12926
2022-10-23Introduce dedicated `-Zdylib-lto` flag for enabling LTO on `dylib`sJakub Beránek-4/+25
2022-10-23Add `rust.lto` config optionJakub Beránek-1/+32
2022-10-21bootstrap: also create rustc-src component in sysrootRalf Jung-0/+14
2022-10-19compiletest: refactor rustcflags to VecAndrew Pollack-3/+7
2022-10-19mark rust-analyzer as a host-only toolPietro Albini-2/+2
All tools meant to be shipped with host toolchains only should be marked as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS = false` incorrectly. This meant that bootstrap attempted to build rust-analyzer for cross-compilation-only targets, causing errors because libstd is not present on some of them. It will still be possible to cross-compile rust-analyzer by passing a different --host flag to ./x, like you can cross-compile other tools.
2022-10-18apply joshua's suggestionPietro Albini-1/+1
Co-authored-by: Joshua Nelson <github@jyn.dev>
2022-10-14more dupe word typosRageking8-1/+1
2022-10-13Remove unused macro argumentOli Scherer-12/+11
2022-10-12Enable `x.py check` for miriOli Scherer-49/+19
2022-10-12Rollup merge of #102239 - joshtriplett:style-guide, r=calebcartwrightDylan DPC-0/+2
Move style guide to rust-lang/rust Per [RFC 3309](https://rust-lang.github.io/rfcs/3309-style-team.html).
2022-10-11Auto merge of #102755 - pcc:data-local-tmp, r=Mark-Simulacrumbors-1/+1
tools/remote-test-{server,client}: Use /data/local/tmp on Android The /data/tmp directory does not exist, at least not on recent versions of Android, which currently leads to test failures on that platform. I checked a virtual device running AOSP master and a Nexus 5 running Android Marshmallow and on both devices the /data/tmp directory does not exist and /data/local/tmp does, so let's switch to /data/local/tmp.
2022-10-10Rollup merge of #102846 - zertosh:update-syn, r=dtolnayMatthias Krüger-4/+4
update to syn-1.0.102 This update removes the only `.gitignore` found in `rustc-src`: vendor/syn/tests/.gitignore vendor/syn-1.0.91/tests/.gitignore vendor/syn-1.0.95/tests/.gitignore To check-in `rustc-src` for hermetic builds in environments with restrictive `.gitignore` policies, one has to remove these `tests/.gitignore` and patch the respective `.cargo-checksum.json`.`syn` >1.0.101 includes dtolnay/syn@3c49303bed7a, which removes its `tests/.gitignore`. Now the `syn` crates.io package has no `.gitignore`. [`rustc-src`'s `vendor`][] is produced from the root `Cargo.toml`, `src/tools/rust-analyzer/Cargo.toml`, `compiler/rustc_codegen_cranelift/Cargo.toml`, and `src/bootstrap/Cargo.toml`. `rustc_codegen_cranelift` does not use `syn`. [`rustc-src`'s `vendor`]: https://github.com/rust-lang/rust/blob/c0784109daa0/src/bootstrap/dist.rs#L934-L940 This was produced with: cargo update --package syn --precise 1.0.102 \ cargo update --package syn --precise 1.0.102 \ --manifest-path src/tools/rust-analyzer/Cargo.toml cargo update --package syn --precise 1.0.102 \ --manifest-path src/bootstrap/Cargo.toml
2022-10-10Auto merge of #94381 - Kobzol:llvm-bolt, r=Mark-Simulacrumbors-0/+122
Use BOLT in CI to optimize LLVM This PR adds an optimization step in the Linux `dist` CI pipeline that uses [BOLT](https://github.com/llvm/llvm-project/tree/main/bolt) to optimize the `libLLVM.so` library built by boostrap. Steps: - [x] Use LLVM 15 as a bootstrap compiler and use it to build BOLT - [x] Compile LLVM with support for relocations (`-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-q"`) - [x] Gather profile data using instrumented LLVM - [x] Apply profile to LLVM that has already been PGOfied - [x] Run with BOLT profiling on more benchmarks - [x] Decide on the order of optimization (PGO -> BOLT?) - [x] Decide how we should get `bolt` (currently we use the host `bolt`) - [x] Clean up The latest perf results can be found [here](https://github.com/rust-lang/rust/pull/94381#issuecomment-1258269440). The current CI build time with BOLT applied is around 1h 55 minutes.
2022-10-09update to syn-1.0.102Andres Suarez-4/+4
2022-10-09Auto merge of #102332 - chriswailes:ndk-update, r=chriswailesbors-7/+18
Update CI to use Android NDK r25b This commit updates the CI definitions to use the most recent Android LTS NDK release: r25b. Changes since the last NDK used by Rust negate the need to generate "standalone toolchains" and newer NDKs can be used in-place. See https://developer.android.com/ndk/guides/other_build_systems#overview
2022-10-09Use BOLT in x64 dist CI to optimize LLVMJakub Beránek-0/+122
2022-10-08Rollup merge of #102790 - cuviper:llvm-tblgen, r=jyn514Michael Howell-13/+14
Fix llvm-tblgen for cross compiling - Let llvm-config tell us where to find its tools - Add llvm-tblgen to rust-dev for cross-compiling Fixes #86890. r? ````@jyn514````
2022-10-08Rollup merge of #102604 - ↵Matthias Krüger-32/+32
anirudh24seven:anirudh_improve_bootrap_readme_readability, r=Mark-Simulacrum Improve readability of bootstrap's README Improve readability of bootstrap's README by adding commas & minor changes
2022-10-08Rollup merge of #102581 - jyn514:src-detection, r=Mark-SimulacrumMatthias Krüger-1/+10
Make the `config.src` handling for downloadable bootstrap more conservative In particular, this supports build directories within an unrelated git repository. Fixes https://github.com/rust-lang/rust/issues/102562. As a side effect, it will fall back to the old logic when the source directory is being built from a tarball within an unrelated git repository. However, that second case is unsupported and untested; we reserve the right to break it in the future. `@cr1901` can you confirm this fixes your problem? cc `@kleisauke,` I believe this will also fix your issue (although your use case still isn't supported). r? `@Mark-Simulacrum`
2022-10-07Don't run llvm-config in dry runsJosh Stone-5/+10
2022-10-07Bump download-ci-llvm-stampJosh Stone-1/+1
2022-10-07Add llvm-tblgen to rust-dev for cross-compilingJosh Stone-0/+1
2022-10-07Let llvm-config tell us where to find its toolsJosh Stone-9/+4
2022-10-07Auto merge of #102025 - chenyukang:fix-102002, r=jyn514bors-2/+10
Delete the stage1 and stage0-sysroot directories when using download-rustc Fixes #102002
2022-10-06tools/remote-test-{server,client}: Use /data/local/tmp on AndroidPeter Collingbourne-1/+1
The /data/tmp directory does not exist, at least not on recent versions of Android, which currently leads to test failures on that platform. I checked a virtual device running AOSP master and a Nexus 5 running Android Marshmallow and on both devices the /data/tmp directory does not exist and /data/local/tmp does, so let's switch to /data/local/tmp.
2022-10-06Rollup merge of #102725 - nnethercote:rm-Z-time, r=davidtwcoMatthias Krüger-1/+1
Remove `-Ztime` Because it has a lot of overlap with `-Ztime-passes` but is generally less useful. Plus some related cleanups. Best reviewed one commit at a time. r? `@davidtwco`
2022-10-06Remove `-Ztime` option.Nicholas Nethercote-1/+1
The compiler currently has `-Ztime` and `-Ztime-passes`. I've used `-Ztime-passes` for years but only recently learned about `-Ztime`. What's the difference? Let's look at the `-Zhelp` output: ``` -Z time=val -- measure time of rustc processes (default: no) -Z time-passes=val -- measure time of each rustc pass (default: no) ``` The `-Ztime-passes` description is clear, but the `-Ztime` one is less so. Sounds like it measures the time for the entire process? No. The real difference is that `-Ztime-passes` prints out info about passes, and `-Ztime` does the same, but only for a subset of those passes. More specifically, there is a distinction in the profiling code between a "verbose generic activity" and an "extra verbose generic activity". `-Ztime-passes` prints both kinds, while `-Ztime` only prints the first one. (It took me a close reading of the source code to determine this difference.) In practice this distinction has low value. Perhaps in the past the "extra verbose" output was more voluminous, but now that we only print stats for a pass if it exceeds 5ms or alters the RSS, `-Ztime-passes` is less spammy. Also, a lot of the "extra verbose" cases are for individual lint passes, and you need to also use `-Zno-interleave-lints` to see those anyway. Therefore, this commit removes `-Ztime` and the associated machinery. One thing to note is that the existing "extra verbose" activities all have an extra string argument, so the commit adds the ability to accept an extra argument to the "verbose" activities.
2022-10-06Auto merge of #102573 - RalfJung:mirisync, r=oli-obkbors-12/+0
Miri sync This is a Miri sync created with my experimental fork of josh. We should probably not merge this yet, but we can use this to check if the sync looks the way it should. r? `@oli-obk`