about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-05-04Rollup merge of #111201 - krasimirgg:add_gitmodules, r=jyn514Matthias Krüger-0/+1
bootstrap: add .gitmodules to the sources The bootstrap builder now expects this file to exist: https://github.com/rust-lang/rust/blob/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/src/bootstrap/builder.rs#L494 Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/missing.20llvm-project.2Fruntimes.20in.20beta.20srcs
2023-05-04Rollup merge of #108865 - Zoxc:library-dummy-crate, r=jyn514Matthias Krüger-6/+6
Add a `sysroot` crate to represent the standard library crates This adds a dummy crate named `sysroot` to represent the standard library target instead of using the `test` crate. This allows the removal of `proc_macro` as a dependency of `test` allowing these 2 crates to build in parallel saving around 9 seconds locally.
2023-05-04bootstrap: add .gitmodules to the sourcesKrasimir Georgiev-0/+1
The bootstrap builder now expects this file to exist: https://github.com/rust-lang/rust/blob/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/src/bootstrap/builder.rs#L494
2023-05-04bootstrap: add llvm-project/runtimes to the sourcesKrasimir Georgiev-0/+2
This is needed to build libunwind for LLVM 16: https://discourse.llvm.org/t/runtimes-removed-support-for-llvm-enable-projects-in-libcxx-libcxxabi-and-libunwind/65707 Doesn't work: with this, running `python3 x.py dist` produces a tar archive that still doesn't contain the runtimes subdirectory?
2023-05-04Rollup merge of #111069 - ozkanonur:remove-pointless-fixme, r=albertlarsan68Dylan DPC-1/+0
remove pointless `FIXME` in `bootstrap::download` The suggestion given by `FIXME` to use `CompilerMetadata` for `download_toolchain` in `bootstrap::download` can result in more confusion. This is because `stamp_key` is not always a date; it can also be a commit hash. Additionally, unlike in `download_beta_toolchain`, in the `download_ci_rustc` function, `version` and `commit` values are calculated separately.
2023-05-01Make x.py work again in most (all?) casesAlbert Larsan-1/+19
Wrap all of x.py in `if __name__ == '__main__':` to avoid problems with `multiprocessing` Make the pool sizing better
2023-05-01remove pointless `FIXME` in `bootstrap::download`ozkanonur-1/+0
The suggestion given by `FIXME` to use `CompilerMetadata` for `download_toolchain` in `bootstrap::download` can result in more confusion. This is because `stamp_key` is not always a date; it can also be a commit hash. Additionally, unlike in `download_beta_toolchain`, in the `download_ci_rustc` function, `version` and `commit` values are calculated separately. Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-30Auto merge of #110427 - Nilstrieb:parallel-bootstrap-startup, r=albertlarsan68bors-15/+86
Parallelize initial Rust download in bootstrap Parallelize the initial download of Rust in `bootstrap.py` `time ./x.py --help` after `rm -r build` Before: 33s After: 27s
2023-04-30Parallelize initial rust extractionNilstrieb-2/+68
This is quite slow and embarassingly parallel, even in python. This speeds up the initial bootstrap build by about 5-10s.
2023-04-30Rollup merge of #110999 - clubby789:bootstrap-stderr, r=Mark-SimulacrumMatthias Krüger-37/+47
Output some bootstrap messages on stderr Fixes #110995
2023-04-30Rollup merge of #110996 - loongarch-rs:fix-bootstrap, r=ozkanonurMatthias Krüger-1/+1
bootstrap: Fix compile error: unused-mut Compile errors: ``` Compiling bootstrap v0.0.0 (/home/hev/rust/rust/src/bootstrap) error: variable does not need to be mutable --> config.rs:1312:17 | 1312 | let mut build_target = config | ----^^^^^^^^^^^^ | | | help: remove this `mut` | = note: `-D unused-mut` implied by `-D warnings` error: could not compile `bootstrap` (lib) due to previous error ```
2023-04-30Rollup merge of #110118 - jyn514:download-error, r=Mark-SimulacrumMatthias Krüger-1/+12
download-rustc: Give a better error message if artifacts can't be dowloaded It should be very rare in practice to happen; people would need to both have `download-ci-llvm` disabled and `download-rustc` enabled. I think it may be more common if we start turning this on by default, though. Helps with https://github.com/rust-lang/rust/issues/81930. Before: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 ``` After: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 error: failed to download pre-built rustc from CI note: old builds get deleted after a certain time help: if trying to compile an old commit of rustc, disable `download-rustc` in config.toml: [rust] download-rustc = false ```
2023-04-29Output some bootstrap messages on stderrclubby789-37/+47
2023-04-29Auto merge of #110576 - jyn514:unify-test-args, r=ozkanonurbors-349/+215
bootstrap: Unify test argument handling Fixes #104198. Does *not* help with https://github.com/rust-lang/rust/issues/80124 because I couldn't figure out a reasonable way to omit `--lib` only for `panic_abort` and not other `std` dependencies. - Remove unnecessary `test_kind` field and `TestKind` struct. These are just subsets of the existing `builder.kind` / `Kind` struct. - Add a new `run_cargo_test` function which handles passing arguments to cargo based on `builder.config` - Switch all Steps in `mod test` to `run_cargo_test` where possible - Combine several steps into one `CrateBootstrap` step. These tests all do the same thing, just with different crate names. - Fix `x test --no-doc`. This is much simpler after the refactors mentioned earlier, but I'm happy to split it into a separate PR if desired. Before, this would panic a lot because steps forgot to pass `--lib`.
2023-04-30bootstrap: Fix compile error: unused-mutWANG Rui-1/+1
2023-04-29Fix `x test --no-deps`jyn-34/+58
- Use `cargo metadata` to determine whether a crate has a library package or not - Collect metadata for all workspaces, not just the root workspace and cargo - Don't pass `--lib` for crates without a library - Use `run_cargo_test` for rust-installer - Don't build documentation in `lint-docs` if `--no-doc` is passed
2023-04-29Combine several `Step`s into a single step with multiple pathsjyn-115/+22
2023-04-29Convert the rest of the `test` Steps to run_cargo_testjyn-85/+79
2023-04-29windows: kill rust-analyzer-proc-macro-srv before deleting stage0 directoryjyn-6/+29
This fixes the following recurring error on windows: ``` Traceback (most recent call last): File "C:\Users\jyn\src\rust\x.py", line 29, in <module> bootstrap.main() File "C:\Users\jyn\src\rust\src\bootstrap\bootstrap.py", line 963, in main bootstrap(args) File "C:\Users\jyn\src\rust\src\bootstrap\bootstrap.py", line 927, in bootstrap build.download_toolchain() File "C:\Users\jyn\src\rust\src\bootstrap\bootstrap.py", line 437, in download_toolchain shutil.rmtree(bin_root) File "C:\Users\jyn\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 759, in rmtree return _rmtree_unsafe(path, onerror) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jyn\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 617, in _rmtree_unsafe _rmtree_unsafe(fullname, onerror) File "C:\Users\jyn\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 622, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "C:\Users\jyn\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 620, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 5] Access is denied: 'C:\\Users\\jyn\\src\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\rust-analyzer-proc-macro-srv.exe' ```
2023-04-29download-rustc: Give a better error message if artifacts can't be downloadedJoshua Nelson-1/+12
Before: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 ``` After: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 error: failed to download pre-built rustc from CI note: old builds get deleted after a certain time help: if trying to compile an old commit of rustc, disable `download-rustc` in config.toml: [rust] download-rustc = false ```
2023-04-29switch Crate to run_cargo_testjyn-61/+43
2023-04-29[wip] separate out a test_crate_args fnjyn-16/+20
2023-04-29Remove unnecessary `test_kind` field and `TestKind` structjyn-66/+21
2023-04-28handle cfg(bootstrap)Pietro Albini-4/+1
2023-04-28Rollup merge of #110909 - john-h-k:build/no-rustc-version-darwin, r=jyn514Yuki Okushi-11/+17
Skip `rustc` version detection on macOS Fixes #104723
2023-04-27Comment round #1John Kelly-2/+3
2023-04-27Skip rustc version detection on macOSJohn Kelly-13/+18
2023-04-27fix bug in set argsyukang-1/+3
2023-04-27Fix help message of option for checking Listyukang-4/+3
2023-04-27add testyukang-0/+6
2023-04-27configure --set support list as argumentsyukang-0/+7
2023-04-25Add a `sysroot` crate to represent the standard library cratesJohn Kåre Alsaker-6/+6
2023-04-25Rollup merge of #110779 - jchzhou:patch, r=albertlarsan68Matthias Krüger-0/+4
configure.py: add flag for riscv{64,32}gc musl-root Add the corresponding flag for detecting `--musl-root-riscv64gc` and `--musl-root-riscv32gc` with ./configure, which is beneficial for downstream Linux distros to create the rust package with the same "recipe" from other architectures.
2023-04-25Rollup merge of #110744 - weihanglo:cargo-credential-install, r=ehussYuki Okushi-3/+3
bootstrap: update paths cargo-credential crate This should be done in #110653 but forgot. Fixes #110742 ## How to verify this patch Run `./x.py build cargo`. Previously it would fail with ```console error: manifest path `/projects/rust/src/tools/cargo/crates/credential/cargo-credential-1password/Cargo.toml` does not exist ```
2023-04-25configure.py: add flag for riscv{64,32}gc musl-rootjchzhou-0/+4
2023-04-24Rollup merge of #110637 - oli-obk:gha, r=jyn514Matthias Krüger-177/+166
Group some sections of our logs in github actions This makes logs a little bit more readable as you can now collapse all the parts that don't interest you (and they get collapsed automatically) Obviously there's a lot more sites where we can/need to do this, too, but this is already helpful imo r? ```@jyn514```
2023-04-23bootstrap: update paths cargo-credential crateWeihang Lo-3/+3
This should be done in #110653 but forgot.
2023-04-23Rollup merge of #110664 - Ezrashaw:fix-bootstrap-build-format, r=jyn514Matthias Krüger-4/+2
stop `x fmt` formatting untracked directories I don't think there's anything else to do? I've confirmed that you get a "skip untracked path foo/ during rustfmt invocations" for the alternative build directory. r? `@jyn514`
2023-04-22Group entire build steps in the gha logsOli Scherer-177/+166
2023-04-22stop `x fmt` formatting alt build dirsEzra Shaw-4/+2
2023-04-21Rollup merge of #110365 - ozkanonur:ship-tools-with-sysroot, r=jyn514Matthias Krüger-7/+27
ship tools with sysroot Provides tool binaries under the sysroot which can be used/tested with `cargo +custom-toolchain $tool` Clippy and fmt works without any problem. But can't say the same for miri: ```sh  ~/devspace/.other/chunk-list  stable $ cargo +stage2 miri setup Running `"rustup" "component" "add" "rust-src"` to install the `rust-src` component for the selected toolchain. error: stage2 is a custom toolchain fatal error: failed to install the `rust-src` component for the selected toolchain ``` it's looking for `$sysroot/lib/rustlib/src/rust/library` and that simply doesn't exists for `x build`. cc `@jyn514` (I thought you might be interested on this, since you did few review iterations on previous PRs of adding tools to sysroot) -- **Update** Now we are able to use `miri` as well. After running `x b miri cargo-miri --stage 2`, I am able to run `cargo +stage2 miri setup` which works as expected. Resolves #110625 Resolves #97762 Resolves #81431
2023-04-21remove the early return in `Sysroot::run` which causes bypassing symlinkingozkanonur-1/+0
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-21ship clippy, miri and rustfmt with sysrootozkanonur-6/+27
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-20Rollup merge of #110574 - wangkirin:fix-out-of-date-comments, r=albertlarsan68Matthias Krüger-2/+2
fix out-of-date comment about rpath in bootstrap in #64316 (https://github.com/rust-lang/rust/pull/64316/commits/1bec962f4687eacb09bf12955c93f6edfd6efee8), the `RUSTC_RPATH` enviroment variables had been removed , but the comments about the rpath still keep it this PR fix it to avoid misunstanding
2023-04-20Rollup merge of #110516 - loongarch-rs:update-bootstrap-linux-raw-sys, ↵Yuki Okushi-2/+2
r=Mark-Simulacrum bootstrap: Update linux-raw-sys to 0.3.2 Adds support for LoongArch.
2023-04-20 fix out of date comment about rpath in bootstrapWang Qilin-2/+2
2023-04-19Rollup merge of #110541 - jyn514:fix-configure, r=ozkanonurMatthias Krüger-5/+7
Fix various configure bugs Fixes https://github.com/rust-lang/rust/issues/107050. Fixes https://github.com/rust-lang/rust/issues/108928. Closes https://github.com/rust-lang/rust/pull/108641. I recommend reading this commit-by-commit to see the commit descriptions, but the code changes are small. This also changes the README to suggest `configure` instead of `printf`, as well as a few other cleanups described in the commit message.
2023-04-19Rollup merge of #110515 - jyn514:download-rustc-llvm, r=albertlarsan68Matthias Krüger-14/+0
Don't special-case download-rustc in `maybe_install_llvm` This is no longer necessary now that the llvm in `rust-dev` matches the one in `rustc`. cc https://github.com/rust-lang/rust/pull/110490#issuecomment-1513026675, https://github.com/rust-lang/rust/pull/110263
2023-04-19Rollup merge of #110429 - jsoref:spelling-src-bootstrap, r=albertlarsan68Matthias Krüger-6/+6
Spelling src bootstrap The various src/* items seem slightly disparate, so I'm doing src/* individually. split from #110392
2023-04-19Rollup merge of #110123 - madsravn:master, r=jyn514Matthias Krüger-0/+6
'./configure' now checks if 'config.toml' exists before writing to that destination Fixes #110109 Instead of overwriting the current `config.toml` file, exit the `./configure` script with a message stating why.