about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-05-26Auto merge of #97410 - jyn514:tool-std-features, r=Mark-Simulacrumbors-1/+6
Only allow `compiletest` to use `feature(test)`, not any other feature Using language features occasionally causes issues when using nightly to bootstrap, rather than beta. See #59264 for additional context.
2022-05-25Only allow `compiletest` to use `feature(test)`, not any other featureJoshua Nelson-1/+6
Using language features occasionally causes issues when using nightly to bootstrap, rather than beta. See #59264 for additional context.
2022-05-25Simplify implementation of `-Z gcc-ld`Vadim Petrochenkov-15/+8
- The logic is now unified for all targets (wasm targets should also be supported now) - Additional "symlink" files like `ld64` are eliminated - lld-wrapper is used for propagating the correct lld flavor - Cleanup "unwrap or exit" logic in lld-wrapper
2022-05-24Make llvm-libunwind a per-target optionTyler Mandry-7/+20
2022-05-24Rollup merge of #97290 - jyn514:fast-submodules, r=Mark-SimulacrumYuki Okushi-44/+30
Turn on `fast_submodules` unconditionally I don't know why anyone would turn this off; doing so makes builds much slower (nearly a 60x slowdown according to #49057). Remove the option to do so, which makes bootstrap a little easier to maintain. Bootstrap continues to allow you to manage submodules manually by setting `submodules = false`.
2022-05-23Turn on `fast_submodules` unconditionallyJoshua Nelson-44/+30
I don't know why anyone would turn this off; doing so makes builds much slower (nearly a 60x slowdown according to #49057). Remove the option to do so, which makes bootstrap a little easier to maintain. Bootstrap continues to allow you to manage submodules manually by setting `submodules = false`.
2022-05-22Rollup merge of #97280 - yue4u:quote-replace-target-in-bootstrap-configure, ↵Jack Huey-1/+1
r=Mark-Simulacrum Quote replace target in bootstrap configure close #97263
2022-05-22Rollup merge of #97277 - jyn514:no-unstable-for-bootstrap, r=Mark-SimulacrumJack Huey-1/+12
Avoid accidentally enabling unstable features in compilers (take 2) This allows rustbuild to control whether crates can use nightly features or not. It also prevents rustbuild from using nightly features itself. This is #92261, but I fixed the CI error.
2022-05-22Disable unstable features in bootstrap toolsJoshua Nelson-0/+8
This statically prevents issues like https://github.com/rust-lang/rust/issues/59264, where tools can only be built with the in-tree compiler and not beta.
2022-05-22Quote replace target in bootstrap configureyue4u-1/+1
2022-05-22Avoid accidentally enabling unstable features in compilers (take 2)Joshua Nelson-1/+4
This allows rustbuild to control whether crates can use nightly features or not. It also prevents rustbuild from using nightly features itself.
2022-05-22Rollup merge of #97228 - jonhoo:patch-1, r=bjorn3Yuki Okushi-1/+1
Omit stdarch workspace from rust-src The path `library/stdarch/crates/Cargo.toml` does not exist. In Rust 1.61.0, `rust-src` still includes `src/rust/library/stdarch/Cargo.toml` (but not `stdarch-verify`), which includes ```toml [workspace] members = [ "crates/stdarch-verify" ``` This didn't show up when testing with `-Zbuild-std` in https://github.com/rust-lang/rust/pull/94907 since the [standard list of crates](https://github.com/rust-lang/cargo/blob/f624095e1c98228a74a165ddb702078c0dd8b81e/src/cargo/core/compiler/standard_lib.rs#L26-L30) to include when building `std` does not include `stdarch`, but it will show up if a user explicitly requests `stdarch`. Or, perhaps more importantly, because of https://github.com/rust-lang/rust/issues/95736, many editors (like IntelliJ) won't treat the root of `rust-src` as a workspace, and will instead recurse into all the sub-crates directly, which then includes `stdarch`. Also related to https://github.com/rust-lang/rust/issues/94906.
2022-05-20Bump LLVM fetched from CI to fix run-makeMark Rousskov-1/+4
2022-05-20Omit stdarch workspace from rust-srcJon Gjengset-1/+1
The path `library/stdarch/crates/Cargo.toml` does not exist. This was introduced in #94907.
2022-05-18Properly apply path prefix remapping paths emitted into debuginfo.Michael Woerister-0/+1
2022-05-15Auto merge of #97055 - matthiaskrgr:rollup-1nqwfzx, r=matthiaskrgrbors-2/+2
Rollup of 3 pull requests Successful merges: - #96958 (Improve settings menu display and remove theme menu) - #97032 (Allow the unused_macro_rules lint for now) - #97041 (Fix `download-ci-llvm` NixOS patching for `.so`s.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-15Rollup merge of #97041 - eddyb:nixos-llvm-ci-patchelf, r=Mark-SimulacrumMatthias Krüger-2/+2
Fix `download-ci-llvm` NixOS patching for `.so`s. See https://github.com/rust-lang/rust/pull/95170#discussion_r872960686 - in short, `Path::ends_with` doesn't do the same thing as `str::ends_with`, and can only be used to check for whole file names, not extensions. With this PR, I get the full suite of: ``` extracting /home/eddy/Projects/rust-A/build/cache/llvm-ebb80ec4e90f8622440f3e33562db0d6e6c66555-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /home/eddy/Projects/rust-A/build/x86_64-unknown-linux-gnu/ci-llvm info: you seem to be using Nix. Attempting to patch /home/eddy/Projects/rust-A/build/x86_64-unknown-linux-gnu/ci-llvm/bin/llvm-config /nix/store/r4bzq2xilvv8fmqjg626hzwi22ah3hf4-rust-stage0-dependencies info: you seem to be using Nix. Attempting to patch /home/eddy/Projects/rust-A/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck info: you seem to be using Nix. Attempting to patch /home/eddy/Projects/rust-A/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so ``` (that `libLLVM-14-rust-1.62.0-nightly.so` at the end having been missing before) r? `@Mark-Simulacrum` cc `@jyn514`
2022-05-15Auto merge of #96602 - TApplencourt:patch-1, r=Mark-Simulacrumbors-50/+98
boostrap.py use curl by default Fixes #61611
2022-05-14Fix rustc-perf benchmarksUrgau-3/+7
2022-05-14Fix `download-ci-llvm` NixOS patching for `.so`s.Eduard-Mihai Burtescu-2/+2
2022-05-13Add LLVM based mingw-w64 targetsMateusz Mikuła-11/+18
2022-05-13Auto merge of #96493 - chbaker0:issue-96342-fix, r=Mark-Simulacrumbors-2/+21
Add compiletest and bootstrap "--skip" option forwarded to libtest With this PR, "x.py test --skip SKIP ..." will run the specified test suite, but forward "--skip SKIP" to the test tool. libtest already supports this option. The PR also adds it to compiletest which itself just forwards it to libtest. Adds the functionality requested in https://github.com/rust-lang/rust/issues/96342. This is useful to work around tests broken upstream. https://github.com/rust-lang/rust/issues/96362#issuecomment-1108609893 is the specific test issue my project is trying to work around.
2022-05-11Auto merge of #96375 - jyn514:bootstrap-submodules, r=Mark-Simulacrumbors-0/+12
Fix running bootstrap tests on a fresh clone In #96303, I changed the tests not to manage submodules, with the main goal of avoiding a clone for llvm-project. Unfortunately, there are some tests which depend on submodules - I didn't notice locally because they were already checked out for me, and CI doesn't use submodule handling at all. Fresh clones, however, were impacted: ``` failures: ---- builder::tests::defaults::doc_default stdout ---- thread 'main' panicked at 'fs::read_dir(builder.src.join(&relative_path).join("redirects")) failed with No such file or directory (os error 2)', src/bootstrap/doc.rs:232:21 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- builder::tests::dist::dist_only_cross_host stdout ---- thread 'main' panicked at 'fs::read_to_string(&toml_file_name) failed with No such file or directory (os error 2)', src/bootstrap/lib.rs:1314:20 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Try and get the best of both worlds by only checking out the submodules actually used in tests.
2022-05-10Fix running bootstrap tests on a fresh cloneJoshua Nelson-0/+12
In #96303, I changed the tests not to manage submodules, with the main goal of avoiding a clone for llvm-project. Unfortunately, there are some tests which depend on submodules - I didn't notice locally because they were already checked out for me, and CI doesn't use submodule handling at all. Fresh clones, however, were impacted: ``` failures: ---- builder::tests::defaults::doc_default stdout ---- thread 'main' panicked at 'fs::read_dir(builder.src.join(&relative_path).join("redirects")) failed with No such file or directory (os error 2)', src/bootstrap/doc.rs:232:21 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- builder::tests::dist::dist_only_cross_host stdout ---- thread 'main' panicked at 'fs::read_to_string(&toml_file_name) failed with No such file or directory (os error 2)', src/bootstrap/lib.rs:1314:20 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Try and get the best of both worlds by only checking out the submodules actually used in tests.
2022-05-10Revert "Make "Assemble stage1 compiler" orders of magnitude faster"Joshua Nelson-3/+9
2022-05-10Add test skip supportCollin Baker-2/+21
libtest already supports a "--skip SUBSTRING" arg which excludes any test names matching SUBSTRING. This adds a "--skip" argument to compiletest and bootstrap which is forwarded to libtest.
2022-05-10Auto merge of #96803 - jyn514:faster-assemble, r=Mark-Simulacrumbors-9/+3
Make "Assemble stage1 compiler" orders of magnitude faster This used to take upwards of 5 seconds for me locally. I found that the culprit was copying the downloaded LLVM shared object: ``` [22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so" [22:28:09] c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } } ``` It turned out that `install()` used full copies unconditionally. Change it to try using a hard-link before falling back to copying.
2022-05-08Make "Assemble stage1 compiler" orders of magnitude fasterJoshua Nelson-9/+3
This used to take upwards of 5 seconds for me locally. I found that the culprit was copying the downloaded LLVM shared object: ``` [22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so" [22:28:09] c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } } ``` It turned out that `install()` used full copies unconditionally. Change it to try using a hard-link before falling back to copying.
2022-05-08Rollup merge of #96829 - JohnTitor:fix-xpy-clippy, r=jyn514Matthias Krüger-2/+2
Fix the `x.py clippy` command Fixes #96826, confirmed clippy runs correctly on local r? `@Mark-Simulacrum`
2022-05-08Auto merge of #96689 - gimbles:campfire, r=Mark-Simulacrumbors-2/+4
Move check-bootstrap from a makefile rule to test::Bootstrap Fixes #96688
2022-05-08Auto merge of #96659 - thatzopoulos:issue-90679-fix, r=Mark-Simulacrumbors-1/+12
Improve error for missing cmake This PR updates the error message for a missing `cmake` to be more in line with the error message for a missing installation of `ninja`. The original issue, (#90679), suggests that both `ninja` and `cmake` are only needed for building LLVM, so I have included the suggestion from `ninja` to set `download-ci-llvm = true` if the user would rather download LLVM. If `cmake` actually is used in other areas, I can remove that part of the message. Fixes: #90679
2022-05-08Auto merge of #96457 - yungkneez:fix-bootstrap, r=Mark-Simulacrumbors-2/+11
Initialize rust-analyzer submodule on bootstrap Fixes #96456
2022-05-08Fix the `x.py clippy` commandYuki Okushi-2/+2
2022-05-07Auto merge of #96824 - matthiaskrgr:rollup-silw3ki, r=matthiaskrgrbors-2/+14
Rollup of 10 pull requests Successful merges: - #96336 (Link to correct `as_mut` in docs for `pointer::as_ref`) - #96586 (Add aliases for std::fs::canonicalize) - #96667 (Add regression test) - #96671 (Remove hard links from `env::current_exe` security example) - #96726 (Add regression and bug tests) - #96756 (Enable compiler-docs by default for `compiler`, `codegen`, and `tools` profiles) - #96757 (Don't constantly rebuild clippy on `x test src/tools/clippy`.) - #96769 (Remove `adx_target_feature` feature from active features list) - #96777 (Make the test `check-pass` not to produce a JSON file) - #96822 (Enforce quote rule for JS source code) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-07updated error message for missing cmakeThomas Hatzopoulos-1/+12
2022-05-07Rollup merge of #96757 - jyn514:fewer-clippy-rebuilds, r=Mark-SimulacrumMatthias Krüger-2/+4
Don't constantly rebuild clippy on `x test src/tools/clippy`. This happened because the `SYSROOT` variable was set for `x test`, but not `x build`. Set it consistently for both to avoid unnecessary rebuilds. This is a very small step towards https://github.com/rust-lang/rust/issues/76495.
2022-05-07Rollup merge of #96756 - jyn514:compiler-docs-default, r=Mark-SimulacrumMatthias Krüger-0/+10
Enable compiler-docs by default for `compiler`, `codegen`, and `tools` profiles I had this overridden locally for a while and realized just now it should probably just be a default.
2022-05-07Auto merge of #96670 - Urgau:bootstrap-check-cfg-features, r=Mark-Simulacrumbors-5/+14
Enable cfg checking of cargo features for everything but std This PR enable `cfg` checking of cargo features for everything but std, it also adds a `FIXME` to myself. > Note: `std`, `alloc` and `core` imports some dependencies by #[path] (like > backtrace, core_simd, std_float, ...), those dependencies have their own features > but cargo isn't involved in the #[path] and so cannot pass the complete list of > features, so for that reason we don't enable checking of features for std. r? `@Mark-Simulacrum`
2022-05-06Rollup merge of #96758 - davidtwco:split-debuginfo-bootstrap-bsd, ↵Michael Goulet-2/+6
r=Mark-Simulacrum bootstrap: bsd platform flags for split debuginfo Addresses https://github.com/rust-lang/rust/pull/96597#issuecomment-1118905025. Bootstrap currently provides `-Zunstable-options` for OpenBSD when using split debuginfo - this commit provides it for all BSD targets. We should probably work out a better way of handling the stability of the split debuginfo flag - all options for the flag are unstable but one of them is the default for each platform already. cc `@m-ou-se` r? `@Mark-Simulacrum`
2022-05-06Rollup merge of #96660 - jyn514:better-missing-path-error, r=Mark-SimulacrumMichael Goulet-1/+13
[bootstrap] Give a better error when trying to run a path with no registered step Before: ``` thread 'main' panicked at 'error: no rules matched invalid', src/bootstrap/builder.rs:287:17 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` After: ``` error: no `check` rules matched 'invalid' help: run `x.py check --help --verbose` to show a list of available paths note: if you are adding a new Step to bootstrap itself, make sure you register it with `describe!` ```
2022-05-07Move check-bootstrap from a makefile rule to test::Bootstrapgimbles-2/+4
2022-05-06bootstrap: bsd platform flags for split debuginfoDavid Wood-2/+6
Bootstrap currently provides `-Zunstable-options` for OpenBSD when using split debuginfo - this commit provides it for all BSD targets. Signed-off-by: David Wood <david.wood@huawei.com>
2022-05-05Don't constantly rebuild clippy on `x test src/tools/clippy`.Joshua Nelson-2/+4
This happened because the `SYSROOT` variable was set for `x test`, but not `x build`. Set it consistently for both to avoid unnecessary rebuilds.
2022-05-05Enable compiler-docs by default for `compiler`, `codegen`, and `tools` profiles.Joshua Nelson-0/+10
2022-05-04Rollup merge of #96597 - semarie:split_debuginfo-unix, ↵Yuki Okushi-1/+2
r=davidtwco,Mark-Simulacrum openbsd: unbreak build on native platform after #95612, only linux and windows target are build with `-Zunstable-options`, but others platforms might use `-Csplit-debuginfo` currently, without this PR, the build of rustc on OpenBSD fails with: ``` Building stage0 tool unstable-book-gen (x86_64-unknown-openbsd) running: "/data/semarie/build-rust/install_dir/beta/bin/cargo" "build" "--target" "x86_64-unknown-openbsd" "-Zbinary-dep-depinfo" "-j" "4" "-v" "--release" "--frozen" "--manifest-path" "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/tools/unstable-book-gen/Cargo.toml" "--message-format" "json-render-diagnostics" error: failed to run `rustc` to learn about target-specific information Caused by: process didn't exit successfully: `/data/semarie/build-rust/build_dir/build/bootstrap/debug/rustc - --crate-name ___ --print=file-names --cfg=bootstrap -Csymbol-mangling-version=v0 -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Csplit-debuginfo=off -Ztls-model=initial-exec --target x86_64-unknown-openbsd --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit status: 1) --- stdout Did not run successfully: exit status: 1 "/data/semarie/build-rust/install_dir/beta/bin/rustc" "-" "--crate-name" "___" "--print=file-names" "--cfg=bootstrap" "-Csymbol-mangling-version=v0" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Csplit-debuginfo=off" "-Ztls-model=initial-exec" "--target" "x86_64-unknown-openbsd" "--crate-type" "bin" "--crate-type" "rlib" "--crate-type" "dylib" "--crate-type" "cdylib" "--crate-type" "staticlib" "--crate-type" "proc-macro" "--print=sysroot" "--print=cfg" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "-Dwarnings" "--sysroot" "/data/semarie/build-rust/install_dir/beta" ------------- --- stderr error: `-Csplit-debuginfo` is unstable on this platform command did not execute successfully: "/data/semarie/build-rust/install_dir/beta/bin/cargo.bin" "build" "--target" "x86_64-unknown-openbsd" "-Zbinary-dep-depinfo" "-j" "4" "-v" "--release" "--frozen" "--manifest-path" ``` I am suspecting that all unix might be affected, but I am unsure about the right conditional to use. so I only added "openbsd" target inside it as I am able to test it. rustc nightly built correctly with this PR on openbsd.
2022-05-03Enable cfg checking of cargo features for everything but stdLoïc BRANSTETT-5/+14
2022-05-02[bootstrap] Give a better error when trying to run a path with no registered ↵Joshua Nelson-1/+13
step Before: ``` thread 'main' panicked at 'error: no rules matched invalid', src/bootstrap/builder.rs:287:17 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` After: ``` error: no `check` rules matched 'invalid' help: run `x.py check --help --verbose` to show a list of available paths note: if you are adding a new Step to bootstrap itself, make sure you register it with `describe!` ```
2022-05-02Auto merge of #96310 - bertptrs:remove-debugger-bootstrap, r=Mark-Simulacrumbors-11/+1
Remove DebbugerScripts from bootstrap CLI This PR implements #95992 and removes the debugger scripts from the bootstrap CLI. I could not find a lot of documentation on the bootstrap binary so perhaps there's still some documentation to be updated.
2022-05-02Remove DebbugerScripts from bootstrap CLIBert Peters-11/+1
2022-05-02openbsd: unbreak build on native platformSébastien Marie-1/+2
after #95612, only linux and windows target are build with -Zunstable-options, but others platforms might use -Csplit-debuginfo add "openbsd" target in the list of platforms using it.