| Age | Commit message (Collapse) | Author | Lines |
|
There is no need to build a stage N toolchain for testing it.
|
|
|
|
If we're in dry run mode, the command will return an empty string, so we can just execute it.
|
|
The code for running tests uses a custom command machinery because it streams the output of the command. We thus need to mark the command as executed in a dry run, to avoid a drop bomb panic.
|
|
|
|
We can move the command creation to a block where it is clear that the command will be executed.
|
|
Avoid printing useless information in the `Debug` output.
|
|
This should make it quicker to debug command failures.
|
|
This makes it harder to accidentally forget to execute a created command in bootstrap.
|
|
through the `as_command_mut` method
This will be useful for disarming drop bombs when the inner command is accessed.
|
|
To enable the previously moved `DropBomb` tests.
|
|
remove unnecessary `git` usages
`Config::src` already contains the top-level path, so we don't need to add git overhead just to reach this path.
|
|
Fix running bootstrap tests with a local Rust toolchain as the stage0
When configuring a local Rust toolchain as the stage0 (with `build.rustc` and `build.cargo` in `config.toml`) we noticed there were test failures (both on the Python and the Rust side) due to bootstrap not being able to find rustc and Cargo.
This was due to those two `config.toml` settings not being propagated in the tests. This PR fixes the issue by ensuring rustc and cargo are always configured in tests, using the parent bootstrap's `initial_rustc` and `initial_cargo`.
try-job: x86_64-msvc
Fixes https://github.com/rust-lang/rust/issues/105766
|
|
|
|
`Config::src` already contains the top-level path, so we don't need to
add git overhead just to reach this path.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
Reuse preexisting macro and switch it to a "bootstrap tool" to try to
resolve build issues.
|
|
This commit promotes the `wasm32-wasip2` Rust target to tier 2 as
proposed in rust-lang/compiler-team#760. There are two major changes in
this PR:
1. The `dist-various-2` container, which already produces the other WASI
targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when
LLD is enabled. This is the linker used for the `wasm32-wasip2` target.
This new linker is added for all host toolchains to ensure that all host
toolchains can produce the `wasm32-wasip2` target. This is similar to
how `rust-lld` was originally included for all host toolchains to be
able to produce WebAssembly output when the targets were first added.
The new linker is developed [here][wasm-component-ld] and is pulled in
via a crates.io-based dependency to the tree here.
[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
|
|
|
|
bootstrap: once_cell::sync::Lazy -> std::sync::LazyLock
Since #121377 has landed on beta
|
|
Mark format! with must_use hint
Uses unstable feature https://github.com/rust-lang/rust/issues/94745
Part of #126475
First contribution to rust, please let me know if the blessing of tests is correct
Thanks `@bjorn3` for the help
|
|
Due to the way the paths initial_rustc and initial_cargo were
constructed before this commit, they mixed \ and / for path separators
and they omitted the .exe suffix.
This worked fine up until now, as Windows is capable of handling the
mixed path separators and the Command::new API adds the ".exe" suffix if
missing from the executable.
This resulted in paths that didn't actually exist on disk though, due to
the missing .exe suffix. This commit fixes that by adding the .exe
suffix to initial_rustc and initial_cargo when --build is Windows.
|
|
|
|
Co-authored-by: Ralf Jung <post@ralfj.de>
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
This should make it harder to accidentally forget to use results of methods on `BootstrapCommand` and `CommandStatus`.
|
|
This change ensures that `config.toml` does not use CI rustc incompatible
options when CI rustc is enabled. This is necessary because some options
can change compiler's behavior in certain scenarios.
The list may not be complete, but should be a good first step as it's better than nothing!
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
This is simply a quality-of-life improvement to make command creation in bootstrap a bit shorter and more discoverable.
|
|
This makes it easier to use commands in a "Fluent-API" style, and also removes the need for the `AsMut` trait hack that
was used before to allow passing both `BootstrapCommand` and `&mut BootstrapCommand` to `Builder::run`.
The `Builder::run` method was still kept and can be used explicitly, if needed for some reason.
|
|
When dry run is enabled, the command for finding LLDB version would succeed, but return an empty string. This was inadvertently enabling a code path that should only be executed when the LLDB is actually present and its version is valid. This commit makes sure that if the version is empty, LLDB will be considered not found.
|
|
|
|
|
|
|
|
|
|
To handle the case of failing to start a `BootstrapCommand`.
|
|
|
|
|
|
|
|
|
|
|
|
bootstrap: pass correct struct size to winapi
Into K32GetProcessMemoryInfo (https://learn.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getprocessmemoryinfo) passed in pointer to PROCESS_MEMORY_COUNTERS, but size of PROCESS_MEMORY_COUNTERS_EX, whoops.
|
|
Make mtime of reproducible tarballs dependent on git commit
Since https://github.com/rust-lang/rust/pull/123246, our tarballs should be fully reproducible. That means that the mtime of all files and directories in the tarballs is set to the date of the first Rust commit (from 2006). However, this is causing some mtime invalidation issues (https://github.com/rust-lang/rust/issues/125578#issuecomment-2141068906).
Ideally, we would like to keep the mtime reproducible, but still update it with new versions of Rust. That's what this PR does. It modifies the tarball installer bootstrap invocation so that if the current rustc directory is managed by git, we will set the UTC timestamp of the latest commit as the mtime for all files in the archive. This means that the archive should be still fully reproducible from a given commit SHA, but it will also be changed with new beta bumps and `download-rustc` versions.
Note that only files are set to this mtime, directories are still set to the year 2006, because the `tar` library used by `rust-installer` doesn't allow us to selectively override mtime for directories (or at least I haven't found it). We could work around that by doing all the mtime modifications in bootstrap, but that would require more changes. I think/hope that just modifying the file mtimes should be enough. It should at least fix cargo `rustc` mtime invalidation.
Fixes: https://github.com/rust-lang/rust/issues/125578
r? ``@onur-ozkan``
try-job: x86_64-gnu-distcheck
|
|
|
|
Bootstrap: Try renaming the file if removing fails
Second attempt at working around https://github.com/rust-lang/rust/issues/127126
If we can't remove the file, then try renaming it. This will leave the destination path free to use.
try-job: x86_64-msvc-ext
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
When CI rustc is enabled, bootstrap tries to symlink the rust source (project root)
into target sysroot right before copying it from the CI rustc's sysroot. This becomes
a problem in CI builders (which we currently don't see because they don't use CI rustc)
because the copying part will fail as they run on read-only mode.
This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking
`rustc-src` from the rust source when download-rustc is not enabled.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Cleanup bootstrap check-cfg
This PR cleanup many custom `check-cfg` in bootstrap that have been accumulated over the years.
As well as updating some outdated comments.
|