about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-02-03Auto merge of #107241 - clubby789:bootstrap-lto-off, r=simulacrumbors-1/+17
Add `rust.lto=off` to bootstrap and set as compiler/library default Closes #107202 The issue mentions `embed-bitcode=on`, but here https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/bootstrap/compile.rs#L379-L381 it appears that this is always set for std stage 1+, so I'm unsure if changes are needed here. `@rustbot` label +A-bootstrap
2023-02-01Rollup merge of #107470 - kadiwa4:bootstrap_cleanup, r=albertlarsan68Matthias Krüger-170/+188
Small bootstrap improvements - i/o-less check for `xz` availability - cache result of NixOS detection - load correct `bootstrap` module even when a package of that name is installed - no `-W semicolon_in_expressions_from_macros` – it is warn-by-default - one type per variable (making dynamic typing less confusing) - integrate python-side `--help` flag into the argument parser (makes `-hv` work as a short form of `--help --verbose`) I even checked that it works with Python 2.
2023-01-31Auto merge of #107297 - Mark-Simulacrum:bump-bootstrap, r=pietroalbinibors-4/+16
Bump bootstrap compiler to 1.68 This also changes our stage0.json to include the rustc component for the rustfmt pinned nightly toolchain, which is currently necessary due to rustfmt dynamically linking to that toolchain's librustc_driver and libstd. r? `@pietroalbini`
2023-01-31assert that `should_fix_bins_and_dylibs` has been runKaDiWa-42/+54
2023-01-31Download rustc component for rustfmt toolchain as wellMark Rousskov-4/+16
2023-01-30bootstrap: --help handlingKaDiWa-23/+24
2023-01-30bootstrap script: slight cleanupKaDiWa-141/+146
2023-01-30Auto merge of #107080 - Urgau:cleanup-bootstrap-extra-check-cfgs, ↵bors-14/+8
r=Mark-Simulacrum bootstrap: cleanup the list of extra check cfgs This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap. - `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos` - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless - `target_arch=le32`: target was removed (https://github.com/rust-lang/rust/pull/45041) - `release`: was removed from rustfmt (https://github.com/rust-lang/rustfmt/pull/5375 and https://github.com/rust-lang/rustfmt/pull/5449) - `dont_compile_me`: was removed from stdarch (https://github.com/rust-lang/stdarch/pull/1308) Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
2023-01-30Rollup merge of #107264 - ferrocene:pa-private-items, r=Mark-SimulacrumDylan DPC-0/+6
Add option to include private items in library docs I need to perform some one-off analysis on libcore, and I wanted to use the unstable JSON rustdoc output to easily do it. Unfortunately, there is currently no way to include unstable items in the library docs. This PR adds support for that, with the off-by-default `build.library-docs-private-items` setting.
2023-01-30Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-SimulacrumDylan DPC-3/+23
Pass `branch.{branch}.remote=origin` to `git submodule update` This works around a bug in git itself. Fixes https://github.com/rust-lang/rust/issues/101144.
2023-01-29When stamp doesn't exist, should say Error, and print path to stamp fileteapot4195-1/+2
2023-01-28Gracefully exit when --keep-stage used on clean source treeteapot4195-0/+7
2023-01-28Rollup merge of #107332 - chansuke:issue-107230, r=albertlarsan68Yuki Okushi-1/+1
Fix wording from `rustbuild` to `bootstrap` Fixes #107230
2023-01-28Rollup merge of #107234 - Rattenkrieg:bootstrap-fix-is_ci_llvm_available, ↵Yuki Okushi-34/+41
r=albertlarsan68 Revisit fix_is_ci_llvm_available logic Fixes #107225 Now `supported_platforms` has a knowledge whether llvm asserts artifacts are available for particular host triple. ``@jyn514`` ``@albertlarsan68`` PTAL
2023-01-27Revisit fix_is_ci_llvm_available logic; read build triple from tomlSergey Prytkov-34/+41
2023-01-27Fix woriding from `rustbuild` to `bootstrap`chansuke-1/+1
2023-01-26also document hidden itemsPietro Albini-1/+1
2023-01-26Add `rust.lto=off` to bootstrapclubby789-1/+17
2023-01-26Rollup merge of #107086 - clubby789:bootstrap-lock-pid-linux, r=albertlarsan68Matthias Krüger-2/+34
Print PID holding bootstrap build lock on Linux Partially address #107077 Parse `/proc/locks` to find the PID of the process which created the build directory lock
2023-01-25Cleanup extra check configs in bootstrapUrgau-14/+8
- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos` - `target_arch=nvptx64`: `nvptx64-nvidia-cuda` - `target_arch=le32`: target was removed (https://github.com/rust-lang/rust/pull/45041) - `release`: was removed from rustfmt (https://github.com/rust-lang/rustfmt/pull/5375 and https://github.com/rust-lang/rustfmt/pull/5449) - `dont_compile_me`: was removed from stdarch (https://github.com/rust-lang/stdarch/pull/1308) Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
2023-01-24add option to include private items in library docsPietro Albini-0/+6
2023-01-23Print PID holding bootstrap build lock on Linuxclubby789-2/+34
2023-01-23Bring tests back into rustc source tarballTomasz Miąsko-1/+1
They were missing after recent move from src/test to tests.
2023-01-23Rollup merge of #106886 - dtolnay:fastinstall, r=Mark-SimulacrumYuki Okushi-6/+22
Make stage2 rustdoc and proc-macro-srv disableable in x.py install Rustdoc will build if `[build] tools = ["rustdoc"]` is set, and rust-analyzer-proc-macro-srv will build if `[build] tools = ["rust-analyzer"]` is set. On my machine skipping these tools speeds up `x.py install` from 7m15s to 6m08s (0m43s for rustdoc and 0m24s for rust-analyzer-proc-macro-srv). This is a significant speedup, since I never use rust-analyzer-proc-macro-srv, and I practically never need to use a custom build of rustdoc.
2023-01-22Rollup merge of #107127 - uweigand:s390x-sanitizer, r=Mark-SimulacrumMatthias Krüger-0/+6
Enable sanitizers for s390x-linux Include sanitizers supported by LLVM on s390x (asan, lsan, msan, tsan) in the target definition, as well as in the compiletest supported list. Build sanitizer runtime for the target. Enable sanitizers in the CI.
2023-01-21Rollup merge of #107015 - cuviper:ra-riscv64, r=Mark-SimulacrumMichael Goulet-6/+0
Re-enable building rust-analyzer on riscv64 It was disabled in #75103 due to an LLVM bug, but followup comments have confirmed that it builds fine on Fedora with LLVM 15. r? ```@Mark-Simulacrum``` cc ```@matklad``` ```@davidlt```
2023-01-20Enable sanitizers for s390x-linuxUlrich Weigand-0/+6
Include sanitizers supported by LLVM on s390x (asan, lsan, msan, tsan) in the target definition, as well as in the compiletest supported list. Build sanitizer runtime for the target. Enable sanitizers in the CI.
2023-01-18Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbinibors-6/+18
Ndk update redux Blocked on https://github.com/rust-lang/blog.rust-lang.org/pull/1055
2023-01-17Re-enable building rust-analyzer on riscv64Josh Stone-6/+0
It was disabled in #75103 due to an LLVM bug, but followup comments have confirmed that it builds fine on Fedora with LLVM 15.
2023-01-14Make stage2 rustdoc and proc-macro-srv disableable in x.py installDavid Tolnay-6/+22
2023-01-14Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrumbors-18/+102
Update mdbook This updates mdbook from 0.4.21 to 0.4.25. The list of changes is [here](https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0425). The only user-visible changes are some changes around the theme picker, and change to the copy-to-clipboard ignoring hidden lines. Internally there were some dependency updates and small fixes. This also updates `clap` from 4.0.15 to 4.0.32 whose changelog is [here](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#4032---2022-12-22). This impacts tools like cargo. I don't see anything particularly noteworthy there, though there are some small user-visible changes. Unfortunately this required adding a hack for building `rustix` with a bootstrap tool. The comment explains why. I am unable to think of some other workaround (or even a cleaner way to set the rustflag). Ideas are welcome if you can think of alternatives. I'm struggling to even think of a long-term solution, other than asking projects not to do auto-nightly feature detection. One medium-term solution is to avoid the clap dependency for the mdbook library (which is how rustix gets pulled in). That is one of my goals for the 0.5 release of mdbook, but that probably won't happen until later this year. It would also require dropping clap from `rustbook` and using some other means to parse arguments (there's only two options, so it can probably be done manually).
2023-01-11Revert "warn newer available version of the x tool"J Haigh-1/+2
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-56/+48
2023-01-09Update mdbookEric Huss-18/+102
2023-01-10Rollup merge of #106387 - jyn514:clippy, r=Mark-SimulacrumYuki Okushi-14/+41
Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`" This reverts commit 9dfe50440e6d48bd2fd40a4b7b3992998e55eace. (Note: that merged as part of https://github.com/rust-lang/rust/pull/106305, but https://github.com/rust-lang/rust/pull/106305/ contains more commits than just 9dfe50440e6d48bd2fd40a4b7b3992998e55eace.) Fixes `x clippy`. It turns out `clippy` was the only one using `tail_args` 🤦 sorry for not testing this earlier. r? `@Mark-Simulacrum`
2023-01-08Rollup merge of #106457 - kadiwa4:no-bless, r=Mark-SimulacrumYuki Okushi-2/+2
Adjust comments about pre-push.sh hook Follow-up to #101175.
2023-01-06Auto merge of #106415 - Nilstrieb:where-is-my-master-branch, r=jyn514bors-75/+62
Handle non-existent upstream master branches in `x fmt` People who do have a remote for `rust-lang/rust` but don't have the master branch checked out there used to get this error when running `x fmt`: > fatal: ambiguous argument 'rust/master': unknown revision or path not in the working tree. > Use '--' to separate paths from revisions, like this: > 'git <command> [<revision>...] -- [<file>...]' > rust/master Which is not exactly helpful. Now, we fall back to `origin/master` (hoping that at least that remote exists) for that case. If there is still some error, we just fall back to `x fmt .` and print a warning. r? `@jyn514`
2023-01-06Handle non-existant upstream master branches in `x fmt`Nilstrieb-17/+52
2023-01-05Add vendor to Fuchsia's target tripleDavid Koloski-2/+2
Historically, Rust's Fuchsia targets have been labeled x86_64-fuchsia and aarch64-fuchsia. However, they should technically contain vendor information. This CL changes Fuchsia's target triples to include the "unknown" vendor since Clang now does normalization and handles all triple spellings. This was previously attempted in #90510, which was closed due to inactivity.
2023-01-04adjust comments about pre-push.sh hookKaDiWa-2/+2
2023-01-04Rollup merge of #106396 - jyn514:bump-stage-date, r=pietroalbiniMatthias Krüger-0/+1
Allow passing a specific date to `bump-stage0` This allows regenerating `src/stage0.json` on changes to the tool, without needing to hard-code the date in the source. It was useful for https://github.com/rust-lang/rust/pull/106394, which added clippy to the list of required components. r? `@pietroalbini`
2023-01-03Rollup merge of #104748 - lqd:download_lld, r=jyn514Michael Goulet-10/+26
Ensure `lld` is supported with `download-ci-llvm` This PR: - ensures LLD's step in bootstrap's dist, but it's not strictly necessary since dist will already package it when it's present. - makes bootstrap's `native::LLD` step support using the packaged `ci-llvm/bin/lld`, instead of building it from source (which would most likely not be available today, nor in the future where `download-ci-llvm = if-available` is the default). If I understand correctly, `--enable-full-tools` will also enable `rust.lld`, and this is why LLD is already packaged today in the `rust-dev` component on the main targets (and why `-Zgcc-ld=lld` does work there). That means it's likely that this PR will not be able to land before I've reworked and landed #101792: if LLD is available in `download-ci-llvm`, the `needs-rust-lld` tests should start being executed on the x64 macOS test builders, and CI would fail today. I've tested locally that building with `download-ci-llvm = true` and `lld = true` with the LLVM submodule unregistered was successful, and that `rust-lld` and the various `lld-wrapper`s are present and `-Zgcc-ld=lld` works as well, on a few different platforms: - `x86_64-unknown-linux-gnu` - `aarch64-apple-darwin` - `x86_64-pc-windows-msvc` (with `-Clinker=rust-lld` rather than `-Zgcc-ld=lld`) - `x86_64-apple-darwin`, with the `MACOSX_DEPLOYMENT_TARGET` workaround for #101653 I don't think we really need to bump the `download-ci-llvm-stamp` in this case, since `./build/$triple/ci-llvm/bin/lld` is present on all the above targets already, but have added it mechanically, and it should probably be removed to avoid unnecessary downloads/churn. Fixes #98340 Supersedes #100010
2023-01-04Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`"Joshua Nelson-14/+41
This reverts commit 9dfe50440e6d48bd2fd40a4b7b3992998e55eace. Fixes `x clippy`.
2023-01-03ensure lld's step unconditionally for RustDev componentRémy Rakic-5/+2
2023-01-03bump download-ci-llvm-stampRémy Rakic-1/+1
2023-01-03turn a comment into an actual doc commentRémy Rakic-7/+7
2023-01-03slight cleanupRémy Rakic-2/+1
2023-01-03make the `native::LLD` step able to use an already built lldRémy Rakic-0/+14
Makes the lld step avoid building it from source when possible: when dist has packaged it along the other LLVM binaries for the rust-dev component.
2023-01-03bootstrap dist: ensure LLD's stepRémy Rakic-0/+6
2023-01-03Add `build_helper` crate to share code between tidy and bootstrapNilstrieb-60/+12