about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-02-24Make most bootstrap step types !CopyNilstrieb-99/+99
This makes all bootstrap types except for `Compiler` and `TargetSelection` `!Copy`. This makes it easier to modify them by adding !Copy types in the future and comes at no cost of code clarity, the impls were completely unused.
2024-02-23on the fly type casting for `build.rustc` and `build.cargo`onur-ozkan-6/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-23Rollup merge of #121495 - cuishuang:master, r=clubby789Matthias Krüger-1/+1
remove repetitive words
2024-02-23remove repetitive wordscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-02-23Rollup merge of #121476 - onur-ozkan:update-compiler-profile, r=compiler-errorsMatthias Krüger-3/+3
remove `llvm.assertions=true` in compiler profile Having this set to true disrupts compiler development workflows for people who use `llvm.download-ci-llvm = true` because we don't provide ci-llvm on the `rustc-alt-builds` server. Therefore, it is kept off by default. cc `@Nilstrieb` `@compiler-errors` For more context, see https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/CI.20LLVM.20for.20aarch64
2024-02-23Auto merge of #121341 - GrigorenkoPV:bootstrap-rustup-cargo, r=onur-ozkanbors-30/+33
bootstrap: don't resolve symlinks for initial_cargo I have put the following in my `config.toml`: ```toml # Includes one of the default files in src/bootstrap/defaults profile = "compiler" change-id = 121203 [build] cargo = "/usr/bin/cargo" rustc = "/usr/bin/rustc" rustfmt = "/usr/bin/rustfmt" ``` I have rustup installed from Arch's repos, which has all of the above paths be symlinks to `/usr/bin/rustup`. This works just fine with the `argv[0]` trick that rustup uses. However, `bootstrap` resolves symlinks to check whether `cargo` exists and then uses the resolved path, so it ends up calling `rustup` directly expecting it to behave like `cargo`. Which it doesn't. This PR removes the canonicalization step, in turn fixing the issue, but sacrificing a pretty error message. However, this exact thing is checked by `x.py` in advance, so I hope it is not a big deal?
2024-02-22set `llvm.assertions` to false in compiler profileonur-ozkan-3/+3
Having this set to true disrupts compiler development workflows for people who use `llvm.download-ci-llvm = true` because we don't provide ci-llvm on the `rustc-alt-builds` server. Therefore, it is kept off by default. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-22add changelog entryonur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-22force dist.compression-profile = "no-op" for `x install`onur-ozkan-2/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-21bootstrap: improvements for stage0 checksPavel Grigorenko-30/+33
+ Do not resolve symlinks (as this may break rustup) + Check version not just for rustc, but also for cargo. + Check that the program's self-reported name matches the expected name (such as "rustc" or "cargo").
2024-02-21Make `x test tests` workclubby789-6/+51
2024-02-21bootstrap: apply most of clippy's suggestionsPavel Grigorenko-326/+317
2024-02-19Remove the "codegen" profile from bootstrapNilstrieb-44/+17
This profile originally made sense when download-ci-llvm = if-unchanged didn't exist and we had the bad tradeoff of "never modify or always compile". Thankfully, these grim times are over and we have discovered clean water, so the only differentiator between the two profiles is the codegen profile having LLVM assertions. Adding them doesn't cause that much of a slowdown, <10% on UI tests from an unscientific benchmark. It also had LLVM warnings when compiling, which makes sense for every compiler contributor brave enough to compile LLVM. The way I removed is by just issueing a nice error message. Given that everyone with this profile should be a contributor and not someone like a distro who is more upset when things break, this should be fine. If it isn't, we can always fall back to just letting codegen mean compiler.
2024-02-19Auto merge of #121079 - onur-ozkan:install-conflicts, r=albertlarsan68bors-3/+8
distribute tool documentations and avoid file conflicts on `x install` I suggest reading commits one-by-one with the descriptions for more context about the changes. Fixes #115213
2024-02-19install rustc before the toolsonur-ozkan-2/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-18Add `rust.frame-pointers` config optionNilstrieb-0/+19
This is very helpful for profiling. I've hacked this in many times, so let's add it properly.
2024-02-17Rollup merge of #121228 - onur-ozkan:fix-clippy-stamp-bug, r=albertlarsan68Matthias Krüger-0/+1
create stamp file for clippy Due to missing stamp file, we were downloading (and applying nix patches if enabled) continuously every time `Config::download_clippy` was called. This change fixes that by creating stamp file at the end of the function. Fixes #119442
2024-02-17Rollup merge of #121091 - onur-ozkan:bypass-stage0-download-in-tests, ↵Matthias Krüger-3/+9
r=albertlarsan68 use build.rustc config and skip-stage0-validation flag This change helps us to bypass downloading the beta compiler in bootstrap tests. more context: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/tests.20causing.20downloads.20of.20native.20rustc.20for.20other.20platforms/near/421467975
2024-02-17create stamp file for clippy in `Config::download_clippy`onur-ozkan-0/+1
Due to missing stamp file, we were downloading (and applying nix patches if enabled) continuously every time `Config::download_clippy` was called. This change fixes that by creating stamp file at the end of the function. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-16Auto merge of #120348 - bjorn3:per_target_backend_selection, r=albertlarsan68bors-37/+74
Support configuring the set of codegen backends to build per host triple This allows building the compiler itself with one backend while using another backend at runtime. For example this allows compiling rustc to wasm using LLVM, while using Cranelift at runtime to produce actual code. Cranelift can't compile to wasm, but is perfectly capable of running on wasm. LLVM can compile to wasm, but can't run on wasm. [^1] [^1]: The prototype of this still requires a couple of other patches.
2024-02-15Fix bootstrap issue with git on MSYSMatt Harding-11/+20
src/bootstrap runs git to find the root of the repository, but this can go awry when building in MSYS for the mingw target. This is because MSYS git returns a unix-y path, but bootstrap requires a Windows-y path.
2024-02-14use build.rustc config and skip-stage0-validation flagonur-ozkan-3/+9
This change helps us to bypass downloading the beta compiler in bootstrap tests. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-14Rollup merge of #118738 - devnexen:netbsd10_update, r=cuviperOli Scherer-0/+1
Netbsd10 update
2024-02-14install tools documentationsonur-ozkan-1/+1
Previously, we were trying to install all doc files under "share/doc/rust" which caused `rust-installer` tool to create backup files (*.old) due to filename conflicts. With this change, doc files is now installed under "share/doc/{package}", where {package} could be rustc, cargo, clippy, etc. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-13Use CMAKE_MSVC_RUNTIME_LIBRARY instead of LLVM_USE_CRT_*Nikita Popov-3/+1
This cmake option has been removed in: https://github.com/llvm/llvm-project/commit/618e5d2c2d8e0c288c37b883ece553ca4f994c2e
2024-02-11Auto merge of #120803 - onur-ozkan:fix-compilation-cache, r=Mark-Simulacrumbors-171/+250
always run `configure_linker` except for mir-opt tests `configure_linker` now runs consistently unless it's for mir-opt tests. Previously `!= "check"` condition was causing dirt in the cargo cache between runs of `x anything-but-not-check` and `x check`. Fixes #120768 cc `@saethlin`
2024-02-11std: enabling new netbsd (10) calls.David Carlier-0/+1
Introducing a new config for this purpose as NetBSD 9 or 8 will be still around for a good while. For now, we re finally enabling sys::unix::rand::getrandom.
2024-02-10Adapt `llvm-has-rust-patches` validation to take `llvm-config` into account.Tim Neumann-4/+3
2024-02-10refactor use of `Cargo` and `configure_linker` in bootstraponur-ozkan-187/+252
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-10Auto merge of #120721 - onur-ozkan:incorrect-llvm-path-on-cross-target, ↵bors-3/+24
r=albertlarsan68 fix `llvm_out` to use the correct LLVM root When `download-ci-llvm` is enabled, `llvm_out` ends up with the error below due to an incorrect path on cross-compilations. This change fixes that. ```sh failed to execute command: "/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version" ERROR: No such file or directory (os error 2) ```
2024-02-09Auto merge of #120852 - matthiaskrgr:rollup-01pr8gj, r=matthiaskrgrbors-2/+4
Rollup of 11 pull requests Successful merges: - #120351 (Implement SystemTime for UEFI) - #120354 (improve normalization of `Pointee::Metadata`) - #120776 (Move path implementations into `sys`) - #120790 (better error message on download CI LLVM failure) - #120806 (Clippy subtree update) - #120815 (Improve `Option::inspect` docs) - #120822 (Emit more specific diagnostics when enums fail to cast with `as`) - #120827 (Print image input file and checksum in CI only) - #120836 (hide impls if trait bound is proven from env) - #120844 (Build DebugInfo for async closures) - #120851 (Remove duplicate release note) r? `@ghost` `@rustbot` modify labels: rollup
2024-02-09Rollup merge of #120790 - onur-ozkan:better-error-message, r=wesleywiserMatthias Krüger-2/+4
better error message on download CI LLVM failure self-explanatory
2024-02-09Auto merge of #120676 - Mark-Simulacrum:bootstrap-bump, r=clubby789bors-4/+0
Bump bootstrap compiler to just-built 1.77 beta https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
2024-02-09Startup objects disappearing from sysrootNicolas Roche-0/+2
When launching tests with --keep-stage option, startup objects such as rsbegin.o an rsend.o may disappear from the corresponding stageN compiler. Fix issue #120784
2024-02-08always run `configure_linker` except for mir-opt testsonur-ozkan-12/+26
`configure_linker` now runs consistently unless it's for mir-opt tests. Previously `!= "check"` condition was causing dirt in the cargo cache between runs of `x anything-but-not-check` and `x check` Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-08better error message on download CI LLVM failureonur-ozkan-2/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-08Step all bootstrap cfgs forwardMark Rousskov-4/+0
This also takes care of other bootstrap-related changes.
2024-02-08make future diffs minimalTshepang Mbambo-2/+2
2024-02-07test `llvm_out` behaviouronur-ozkan-0/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-06Don't call std_cargo to build mir-only sysrootsBen Kimock-1/+1
2024-02-06Tweak a few mir-opt tests instead of using -Clink-dead-codeBen Kimock-1/+0
2024-02-06Use a better set of targets for blessing mir-opt testsBen Kimock-206/+201
2024-02-07fix `llvm_out` to use the correct LLVM rootonur-ozkan-3/+7
When `download-ci-llvm` is enabled, `llvm_out` ends up with the error below due to an incorrect path on cross-compilations. This change fixes that. ``` failed to execute command: "/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version" ERROR: No such file or directory (os error 2) ``` Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-01-31Rollup merge of #120207 - onur-ozkan:120202-fix, r=clubby789Nadrieril-6/+8
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test Fixes a logical bug in `profile_user_dist` test (explained in #120202).
2024-01-30check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` testonur-ozkan-6/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-01-30Rollup merge of #120434 - fmease:revert-speeder, r=petrochenkovGuillaume Gomez-6/+3
Revert outdated version of "Add the wasm32-wasi-preview2 target" An outdated version of #119616 was merged in rollup #120309. This reverts those changes to enable #119616 to “retain the intended diff” after a rebase. ```@rylev``` has agreed that this would be the cleanest approach with respect to the history. Unblocks #119616. r? ```@petrochenkov``` or compiler or libs
2024-01-30Rollup merge of #120403 - seqre-contrib:pre-vendored-message, r=onur-ozkanGuillaume Gomez-1/+10
Add instructions of how to use pre-vendored 'rustc-src' This PR closes #110163. I had to move the URL to the left, making it not aligned as it is three lines above, but the tidy check would yell at me otherwise. If that's not acceptable, I'd love some suggestions on how to make it better. One question: in the original issue (https://github.com/rust-lang/rust/issues/110163#issuecomment-1502647562), it was suggested to mention how to download specific commit tarballs; however, it was said it's not documented anywhere, so I did not include that yet. If there is a want to have that, I'd gladly amend the commit.
2024-01-30Rollup merge of #120172 - onur-ozkan:add-more-tests, r=Mark-SimulacrumGuillaume Gomez-11/+63
bootstrap: add more unit tests self-explanatory
2024-01-28Add instructions of how to use pre-vendored 'rustc-src'Marek 'seqre' Grzelak-1/+10
2024-01-28bootstrap: update test modulesonur-ozkan-10/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>