summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-11-20Revert "Update CI to use Android NDK r25b"Alex Pinkus-18/+7
This reverts commit bf7f1ca316a249cf99d722d79a0db12fef687142.
2022-10-31Adjust miri to still be optionalMark Rousskov-25/+31
We don't distribute a miri build for beta/stable so it needs to be kept optional. In the future it likely makes sense to switch the miri *artifacts* to always be built, but the rustup component to not be included -- this will avoid some of this pain.
2022-10-31Enable RUSTC_BOOTSTRAP for a few stepsMark Rousskov-0/+3
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-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-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`
2022-10-05add a "standalone" path for doc::Standalone to be able to exclude itPietro Albini-1/+1
Before this commit, the path for the doc::Standalone step was "src/doc", which is accurate as the standalone docs source files live at the root of the "src/doc" directory tree. Unfortunately, that caused bad interactions when trying to exclude it with `--exclude src/doc`. When an exclusion is passed to bootstrap, it will exclude all steps whose path *ends with* the exclusion, which results in the Cargo book (src/tools/cargo/src/doc) to also be excluded. To work around this problem, this commit adds the "standalone" path as an alternate path for doc::Standalone, allowing `--exclude standalone` to work without side effects.
2022-10-05split steps for generating the standalone docs and the shared assetsPietro Albini-16/+45
Before this commit, the step to generate the standalone docs (which included the index page and other HTML files at the root of the documentation) was bundled with the code copying files needed by multiple pieces of documentation. This means it wasn't possible to avoid generating the standalone docs. This commit splits the step into two, allowing the standalone docs generation to be excluded while still building the rest of the docs.
2022-10-04Rollup merge of #102686 - cuviper:rls-tool_std, r=jyn514Michael Howell-1/+1
Don't build the compiler before building rls The rls stub is a simple stable tool, which doesn't need compiler libs. (Similar to #97511)
2022-10-04Don't build the compiler before building rlsJosh Stone-1/+1
The rls stub is a simple stable tool, which doesn't need compiler libs.
2022-10-04Update CI to use Android NDK r25bChris Wailes-7/+18
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-04Rollup merge of #102241 - jyn514:manifest-json-docs, r=Mark-SimulacrumMatthias Krüger-0/+1
Package `rust-docs-json` into nightly components (take 3) `dist` creates a `rust-docs-json.tar.xz` tarfile. But build-manifest expected it to be named `rust-docs-json-preview.tar.xz`. Change build-manifest to allow the name without the `-preview` suffix. I haven't actually tested this :( build-manifest is a pain to run locally.
2022-10-04test Miri changes in PR CI; we no longer need xargoRalf Jung-12/+0
2022-10-04use ci-rustc-sysroot for sysroot when download_rustcyukang-5/+5
2022-10-02re-add git-commit-hash file to tarballsdawnofmidnight-0/+7
rust-lang/rust#100557 removed the `git-commit-hash` file and replaced it with `git-commit-info`. However, build-manifest relies on the `git-commit-hash` file being present, so this adds it back.
2022-10-03Remove trailing whitespacesAnirudh-3/+3
2022-10-03Improve readability of bootstrap's README by adding commas and minor changesAnirudh-32/+32
(cherry picked from commit e5e4b85feba6463310d0fc0c27e8ff38891efac3)
2022-10-02Auto merge of #100557 - dawnofmidnight:tarball-commit-info, r=Mark-Simulacrumbors-47/+121
fix: use git-commit-info for version information Fixes #33286. Fixes #86587. This PR changes the current `git-commit-hash` file that `./x.py` dist puts in the `rustc-{version}-src.tar.{x,g}z` to contain the hash, the short hash, and the commit date from which the tarball was created, assuming git was available when it was. It uses this for reading the version so that rustc has all the appropriate metadata. # Testing Testing this is kind of a pain. I did it with something like ```sh ./x.py dist # ensure that `ignore-git` is `false` in config.toml cp ./build/dist/rustc-1.65.0-dev-src.tar.gz ../rustc-1.65.0-dev-src.tar.gz cd .. && tar -xzf rustc-1.65.0-dev-src && cd rustc-1.65.0-dev-src ./x.py build ``` Then, the output of `rustc -vV` with the stage1 compiler should have the `commit-hash` and `commit-date` fields filled, rather than be `unknown`. To be completely sure, you can use `rustc --sysroot` with the stdlib that the original `./x.py dist` made, which will require that the metadata matches.
2022-10-02Make the `config.src` handling for downloadable bootstrap a little more ↵Joshua Nelson-1/+10
conservative In particular, this supports build directories within an unrelated git repository. 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.
2022-10-02Auto merge of #102558 - matthiaskrgr:rollup-0odec1c, r=matthiaskrgrbors-2/+5
Rollup of 6 pull requests Successful merges: - #102195 (Improve the COPYRIGHT file) - #102313 (Update docs so that deprecated method points to relevant method) - #102353 (Allow passing rustix_use_libc cfg using RUSTFLAGS) - #102405 (Remove a FIXME whose code got moved away in #62883.) - #102525 (rustdoc: remove orphaned link on array bracket) - #102557 (fix issue with x.py setup running into explicit panic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup