about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-11-05Rollup merge of #116017 - Zalathar:darwin-stdlib, r=albertlarsan68Matthias Krüger-4/+3
Don't pass `-stdlib=libc++` when building C files on macOS When using *Command Line Tools for Xcode* version 15.0, clang will warn about `argument unused during compilation: '-stdlib=libc++'` if this flag is present when compiling C files only (i.e. no C++ files). To avoid this warning, we can add the flag only to CXXFLAGS and not to CFLAGS. --- [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/clang.20warning.3A.20argument.20unused.20during.20compilation.20.28libc.2B.2B.29)
2023-11-04Don't disable inline asm usage in compiler-builtins when the cranelift ↵bjorn3-5/+0
backend is enabled This was a leftover from when inline asm wasn't universally supported by the cranelift backend yet. It would cause the optimized inline asm intrinsics to be avoided for the standard library distributed with rustup now that we build the cranelift backend by default on nightly for several tier 1 targets.
2023-11-04ensure doc directory is not emptyonur-ozkan-1/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04handle dry runs in `dist::CodegenBackend`Rémy Rakic-0/+4
self.number_of_times_dry_runs_have_caused_issues += 1;
2023-11-04Ensure the rustc-codegen-cranelift-preview component is never emptybjorn3-0/+7
Either generate it with the actual codegen backend dylib or omit it entirely when the cranelift backend is disabled for this build.
2023-11-04add sanity check for compiler crate docsonur-ozkan-0/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04Ensure compiler crate paths are generated before linkingonur-ozkan-11/+12
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-03Auto merge of #117538 - matthiaskrgr:rollup-63u77xb, r=matthiaskrgrbors-7/+1
Rollup of 5 pull requests Successful merges: - #117434 (delegate `<Box<E> as Error>::provide` to `<E as Error>::provide`) - #117505 (Fix incorrect trait bound restriction suggestion) - #117520 (Clippy subtree update) - #117523 (oli-obk is on vacation) - #117533 (Revert "bootstrap: do not purge docs on CI environment") r? `@ghost` `@rustbot` modify labels: rollup
2023-11-03Rollup merge of #117533 - onur-ozkan:revert-117471, r=onur-ozkanMatthias Krüger-7/+1
Revert "bootstrap: do not purge docs on CI environment" This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7. ref https://github.com/rust-lang/rust/issues/117430#issuecomment-1791609163, https://github.com/rust-lang/rust/pull/117471#issuecomment-1791937529
2023-11-03Revert "Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum"Ralf Jung-11/+0
This reverts commit 1dfb6b162be402d8ca37e8aad4f58898b44e3a15, reversing changes made to bcb5798dd890a691644af9d371f3bd7fcc465584. That commit broke generating nightly rustc docs. Revert it until we can figure out how to have both, cranelift and docs.
2023-11-03Revert "bootstrap: do not purge docs on CI environment"onur-ozkan-7/+1
This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7.
2023-11-03Auto merge of #117313 - GuillaumeGomez:cg_gcc-tests, r=onur-ozkanbors-2/+156
Run part of `rustc_codegen_gcc`'s tests in CI Thanks to #112701 and `@bjorn3,` it made this much easier. Also cc `@antoyo.` r? `@bjorn3`
2023-11-02bootstrap/setup: create hooks directory if non-existingAlejandro Martinez Ruiz-1/+6
2023-11-02Add FIXME header for two comments in cg_gcc and cg_clif boostrap typesGuillaume Gomez-2/+2
2023-11-02Force mangling version for rustc_codegen_gccGuillaume Gomez-0/+1
2023-11-02Only run cg_gcc tests on linux x86_64Guillaume Gomez-10/+2
2023-11-02Add comment explaning when to uncomment the `prepare` command codeGuillaume Gomez-0/+2
2023-11-02Run rustc_codegen_gcc tests in the CIGuillaume Gomez-2/+161
2023-11-02bootstrap: do not purge docs on CI environmentonur-ozkan-1/+7
Temporary fix for https://github.com/rust-lang/rust/issues/117430 Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-31update config.example.tomlSparrowLii-1/+1
2023-10-31update bootstrap change historySparrowLii-1/+1
2023-10-31enable parallel rustc in nightly buildsSparrowLii-2/+5
2023-10-30Rollup merge of #117383 - onur-ozkan:fix-x-install, r=albertlarsan68Guillaume Gomez-22/+30
improve and fix `x install` Fix: Write access check of `prefix` and `sysconfdir` when DESTDIR is present. Improvement: Instead of repeatedly reading `DESTDIR` within each `fn prepare_dir` usage, read it once and pass it to the `fn prepare_dir`. Fixes #117203
2023-10-30Rollup merge of #117356 - he32:netbsd-mipsel, r=oli-obkGuillaume Gomez-0/+6
Add support for mipsel-unknown-netbsd, 32-bit LE mips.
2023-10-30improve and fix x installonur-ozkan-22/+30
Fix: Write access check of `prefix` and `sysconfdir` when DESTDIR is present. Improvement: Instead of repeatedly reading `DESTDIR` within each `fn prepare_dir` usage, read it once and pass it to the `fn prepare_dir`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-30bootstrap: bump fd-lock, clap and windows.chenx97-86/+68
this also updates target-sensitive dependencies like rustix and libc.
2023-10-30Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrumbors-0/+11
pass `CODEGEN_BACKENDS` to docker The backends to build are now defined in the `CODEGEN_BACKENDS` env var. It's correctly set in CI, but wasn't passed to docker, hence cg_clif wasn't actually built in #81746. r? `@Kobzol:` I locally tried `CODEGEN_BACKENDS="cranelift" DEPLOY=1 src/ci/docker/run.sh dist-x86_64-linux` and this change was enough for `ci/run.sh` to read the env var. So I'll try as-is and we'll see.
2023-10-29handle dry runs in `dist::CodegenBackend`Rémy Rakic-0/+4
self.number_of_times_dry_runs_have_caused_issues += 1;
2023-10-29Add support for mipsel-unknown-netbsd, 32-bit LE mips.Havard Eidnes-0/+6
2023-10-29Rollup merge of #117043 - onur-ozkan:skip-stage0-validation, r=Mark-SimulacrumGuillaume Gomez-2/+6
add bootstrap flag `--skip-stage0-validation` This change introduces the `--skip-stage0-validation` flag, which permits the use of any desired version of the stage0 compiler without verifying its version. Additionally, stage0 compiler validation check is reverted(#115103) to its default enabled state. Helps to #115065 r? Mark-Simulacrum
2023-10-28Remove asmjs from bootstrapJubilee Young-1/+1
2023-10-28Rollup merge of #117322 - onur-ozkan:fix-suppressed-outputs, r=KobzolJubilee-2/+6
change default output mode of `BootstrapCommand` `SuppressOnSuccess` on `BootstrapCommand` is a problematic default mode as it affects the logs during the bootstrapping (as shown in the screenshot below). The default behavior should be to print everything unless we explicitly modify the behavior within build steps. ![image](https://github.com/rust-lang/rust/assets/39852038/8dbaaeb2-0656-4ff9-8e48-1ac0734a913f) Fixes #117315 cc `@Kobzol`
2023-10-28Ensure the rustc-codegen-cranelift-preview component is never emptybjorn3-0/+7
Either generate it with the actual codegen backend dylib or omit it entirely when the cranelift backend is disabled for this build.
2023-10-28set `BootstrapCommand` output mode for submodulesonur-ozkan-1/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-28change default output mode of `BootstrapCommand`onur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-28Auto merge of #81746 - bjorn3:cg_clif_rustup_component, r=Mark-Simulacrumbors-27/+135
Distribute cg_clif as rustup component on the nightly channel This makes it possible to use cg_clif using: ```bash $ rustup component add rustc-codegen-cranelift-preview --toolchain nightly $ RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build ``` cc https://github.com/rust-lang/compiler-team/issues/405. r? `@Mark-Simulacrum`
2023-10-28Auto merge of #117197 - Zalathar:demangler, r=onur-ozkanbors-2/+4
Avoid unnecessary builds/rebuilds of `rust-demangler` This is a combination of two loosely-related changes: - Don't build `rust-demangler` as a dependency of `tests/run-make`, because after #112300 none of the remaining run-make tests actually use it. (If future run-make tests ever do need the demangler, it'll be easy to add it back.) - For `tests/run-coverage`, build the demangler with the stage 0 compiler instead of the current-stage compiler. This avoids having to uselessly rebuild the demangler after modifying and rebuilding the compiler itself.
2023-10-27Explicitly mark which targets to distribute cg_clif for in CIbjorn3-1/+3
This avoids needlessly building cg_clif for other targets and makes it easier for the dist code to determine if it should distribute cg_clif as component.
2023-10-27Rollup merge of #117287 - onur-ozkan:fix-miri-target-info, r=RalfJungMatthias Krüger-1/+1
fix miri target information for Test step self-explanatory r? RalfJung
2023-10-27fix miri target information for Test steponur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-27Distribute cg_clif as a rustup componentbjorn3-27/+133
2023-10-27For run-coverage tests, build `rust-demangler` with the stage 0 compilerZalathar-1/+3
This avoids useless rebuilds of the demangler when modifying the compiler.
2023-10-27Don't provide `rust-demangler` to run-make testsZalathar-1/+1
The demangler was only needed by coverage tests, but those tests were migrated into their own custom test mode in #112300. This avoids having to build the demangler just for run-make tests. It will still be built as needed by run-coverage tests or for other purposes.
2023-10-26Auto merge of #117249 - matthiaskrgr:rollup-h4og5rv, r=matthiaskrgrbors-1/+4
Rollup of 6 pull requests Successful merges: - #116968 (Invalid `?` suggestion on mismatched `Ok(T)`) - #117032 (Enable cg_clif tests for riscv64gc) - #117106 (When expecting closure argument but finding block provide suggestion) - #117114 (Improve `stringify.rs` test) - #117188 (Avoid repeated interning of `env!("CFG_RELEASE")`) - #117243 (Explain implementation of mem::replace) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-26Rollup merge of #117032 - bjorn3:riscv64_enable_cg_clif_tests, r=petrochenkovMatthias Krüger-1/+4
Enable cg_clif tests for riscv64gc Cranelift now has support for riscv64 on Linux.
2023-10-26Auto merge of #116581 - Kobzol:bootstrap-cmd-run, r=onur-ozkanbors-80/+158
Centralize command running in boostrap (part one) This PR tries to consolidate the various `run, try_run, run_quiet, run_quiet_delaying_failure, run_delaying_failure` etc. methods on `Builder`. This PR only touches command execution which doesn't produce output that would be later read by bootstrap, and it also only refactors spawning of commands that happens after a builder is created (commands executed during download & git submodule checkout are left as-is, for now). The `run_cmd` method is quite meaty, but I expect that it will be changing rapidly soon, so I considered it easy to kept everything in a single method, and only after things settle down a bit, then maybe again split it up a bit. I still kept the original shortcut methods like `run_quiet_delaying_failure`, but they now only delegate to `run_cmd`. I tried to keep the original behavior (or as close to it as possible) for all the various commands, but it is a giant mess, so there may be some deviations. Notably, `cmd.output()` is now always called, instead of just `status()`, which was called previously in some situations. Apart from the refactored methods, there is also `Config::try_run`, `check_run`, methods that run commands that produce output, oh my… that's left for follow-up PRs :) The driving goal of this (and following) refactors is to centralize command execution in bootstrap on a single place, to make command mocking feasible. r? `@onur-ozkan`
2023-10-26Allow ignoring the failure of command executionJakub Beránek-5/+18
2023-10-26Auto merge of #116983 - Urgau:prepare-bootstrap-for-new-check-cfg, r=Kobzolbors-8/+28
Prepare the `bootstrap` tool for the new check-cfg syntax This PR prepare the `bootstrap` tool for the [new check-cfg syntax](https://github.com/rust-lang/rust/pull/111072) as well as the according [changes to Cargo](https://github.com/rust-lang/cargo/pull/12845). ~~Note that while the new syntax can technically available on stage > 2, we actually cannot use it since we need a cargo version that supports the new syntax which won't happen until the next beta bump (if I understand everything correctly).~~ r? bootstrap
2023-10-26Auto merge of #115872 - ferrocene:pa-remap-cargo-home, r=clubby789bors-1/+33
Remap Cargo dependencies to /rust/deps :warning: **This doesn't affect user-compiled programs, it only affects building the Rust compiler itself.** :warning: Right now, `rust.remap-debuginfo = true` doesn't completely remap all paths: while LLVM and rustc sources are properly remapped (respectively to `/rust/llvm` and `/rust/$commit`), Cargo dependencies still use absolute paths from the Cargo home. This never affected builds from CI much, because `CARGO_HOME=/cargo` in CI, so users see paths like this included in the precompiled binaries and libraries: ``` /cargo/registry/src/index.crates.io-6f17d22bba15001f/gimli-0.26.2/src/read/line.rs ``` Builds outside CI don't have remapping though, and it's confusing that the config flag doesn't fully do what it advertises. This PR fixes it by adding remapping for dependencies too. *All registries's* source directory are remapped to `/rust/deps`, to account for multiple registries being able to contain crates.io crates (sparse index vs git, and source replacement mirrors). This results in paths like this being included: ``` /rust/deps/gimli-0.26.2/src/read/line.rs ```
2023-10-24update suggest-testsPietro Albini-2/+7