| Age | Commit message (Collapse) | Author | Lines |
|
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)
|
|
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.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
self.number_of_times_dry_runs_have_caused_issues += 1;
|
|
Either generate it with the actual codegen backend dylib or omit it
entirely when the cranelift backend is disabled for this build.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
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
|
|
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
|
|
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.
|
|
This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7.
|
|
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`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Temporary fix for https://github.com/rust-lang/rust/issues/117430
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
|
|
|
|
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
|
|
Add support for mipsel-unknown-netbsd, 32-bit LE mips.
|
|
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>
|
|
this also updates target-sensitive dependencies like rustix
and libc.
|
|
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.
|
|
self.number_of_times_dry_runs_have_caused_issues += 1;
|
|
|
|
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
|
|
|
|
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.

Fixes #117315
cc `@Kobzol`
|
|
Either generate it with the actual codegen backend dylib or omit it
entirely when the cranelift backend is disabled for this build.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
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`
|
|
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.
|
|
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.
|
|
fix miri target information for Test step
self-explanatory
r? RalfJung
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
This avoids useless rebuilds of the demangler when modifying the compiler.
|
|
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.
|
|
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
|
|
Enable cg_clif tests for riscv64gc
Cranelift now has support for riscv64 on Linux.
|
|
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`
|
|
|
|
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
|
|
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
```
|
|
|