| Age | Commit message (Collapse) | Author | Lines |
|
methods via config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#129121 (Stabilize `tcp_quickack`)
- rust-lang/rust#142192 (De-duplicate f16 & f128 doctest attributes)
- rust-lang/rust#142193 (add tests for pattern binding drop order edge cases)
- rust-lang/rust#142222 (Dont make `ObligationCtxt`s with diagnostics unnecessarily)
- rust-lang/rust#142228 (rustc-dev-guide subtree update)
- rust-lang/rust#142231 (Run `calculate_matrix` job on `master` to cache citool builds)
- rust-lang/rust#142232 (add `Cargo.lock` to CI-rustc allowed list for non-CI env)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
add `Cargo.lock` to CI-rustc allowed list for non-CI env
Changes to dependencies usually require modifying `Cargo.toml`, which would already invalidate the CI-rustc cache if done in non-allowed paths. On non-CI environment, it should be safe to add `Cargo.lock` to the list of allowed paths as there is no real risk aside from a very rare false positive in cases like minor bumps to non-allowed path dependencies without modifying the `Cargo.toml` files.
Fixes rust-lang/rust#141986
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Only allow `bootstrap` cfg in rustc & related
Fixes https://github.com/rust-lang/rust/issues/142150
r? bootstrap
|
|
Remap compiler vs non-compiler sources differently (bootstrap side)
See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083).
The path remapping and unremapping for compiler sources (distributed via `rustc-dev` dist component) is broken because bootstrap currently remaps all sources unconditionally (if remapping is enabled) to the `/rustc/{hash}` form. However, the `rustc-dev` dist component (compiler sources) and `rust-src` dist component (library sources) unpacks differently:
- `rust-src` unpacks sources to a path like `$sysroot/lib/rustlib/src/rust`, whereas
- `rustc-dev` unpacks sources to a path like `$sysroot/lib/rustlib/rustc-src/rust`[^note],
meaning that the compiler need to unremap them differently. But the same remapping means that the compiler has no way to distinguish between compiler and non-compiler (esp. standard library) sources. To remedy this, this PR adopts the approach of:
- remapping compiler sources (corresponding to `rustc-dev` dist component) with `/rustc-dev/{hash}` (this is `RemapScheme::Compiler`), and
- remapping non-compiler sources (corresponding to `rust-src` dist component or other non-compiler sources) with `/rustc/{hash}` (this is `RemapScheme::NonCompiler`).
A different remapping allows the compiler to reverse the remapping differently.
This PR implements the bootstrap side. A follow-up compiler-side change is needed to implement the unremapping change to address the reported issue completely.
This PR introduces another env var `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` that is made available to the compiler when building compiler sources to know what the remap scheme for `rustc-dev` (`RemapScheme::Compiler`) is. Compiler sources are built with the compiler remapping scheme.
As far as I know, this change should not introduce new regressions, because the compiler source unremapping (through `rustc-dev`) is already broken.
[^note]: (Notice the `src` vs `rustc-src` difference.)
|
|
Add new Tier-3 targets: `loongarch32-unknown-none*`
MCP: https://github.com/rust-lang/compiler-team/issues/865
NOTE: LoongArch32 ELF object support is available starting with object v0.37.0.
|
|
|
|
|
|
|
|
|
|
Fix bootstrap tracing imports
|
|
|
|
bootstrap: Remove `rustc_snapshot_libdir` from PATH in one more place
Same as https://github.com/rust-lang/rust/pull/141657 but in a different part of the build system, with the same goal of addressing [#t-infra/bootstrap > Build broken in MSYS2 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Build.20broken.20in.20MSYS2/near/520709527).
It seems to work on windows-{gnu,msvc} and linux-gnu at least.
r? jieyouxu
|
|
r=saethlin
bootstrap: build std sans leaf frame pointers
Sometimes leaf frame-pointers can impact LLVM inlining choices, and that can be a real problem for things like `mul_add`.
|
|
|
|
modularize the config module bootstrap
Currently, our `config` module is quite large over 3,000 lines, and handles a wide range of responsibilities. This PR aims to break it down into smaller, more focused submodules to improve readability and maintainability:
* **`toml`**: Introduces a dedicated `toml` submodule within the `config` module. Its sole purpose is to define configuration-related structs along with their corresponding deserialization logic. It also contains the `parse_inner` method, which serves as the central function for extracting relevant information from the TOML structs and constructing the final configuration.
* **`rust`, `dist`, `install`, `llvm`, `build`, `gcc`, and others**: Each of these modules contains TOML subsections specific to their domain, along with the logic necessary to convert them into parts of the final configuration struct.
* **`config/mod.rs`**: Contains shared types and enums used across multiple TOML subsections.
* **`config/config.rs`**: Houses the logic that integrates all the TOML subsections into the complete configuration struct.
r? `@kobzol`
|
|
MCP: https://github.com/rust-lang/compiler-team/issues/865
|
|
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#141709 (jsondocck: Refactor directive handling)
- rust-lang/rust#141974 (`tests/ui`: A New Order [4/N])
- rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately)
- rust-lang/rust#142015 (Report the actual item that evaluation failed for)
- rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks)
- rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens)
- rust-lang/rust#142036 (Update the `compiler-builtins` subtree)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
bootstrap: Fix file permissions when dereferencing symlinks
## Problem
When copying files in the bootstrap process with `dereference_symlinks = true`, we're incorrectly using the symlink's metadata to set permissions on the copied regular file, which results in the following error:
```
Warning: Failed to set file times for "/build/nix-build-rustc-1.86.0.drv-0/rustc-1.86.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-strip" (permissions: Permissions(FilePermissions { mode: 0o100000 (----------) })) error: Permission denied (os error 13)
```
Verbose Logs confirming the error:
```
TRACE: Found llvm-strip copy operation
Source: /n/nix/tech/store/n34yzv2n50p6lbjmx089vjym121wbl4j-llvm-19.1.7/bin/llvm-strip
Destination: /build/nix-build-rustc-1.86.0.drv-0/rustc-1.86.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-strip
Source is_symlink (via symlink_metadata): true
Source symlink_metadata permissions: 120000
Source symlink_metadata file_type: FileType { is_file: false, is_dir: false, is_symlink: true, .. }
Source is symlink pointing to: llvm-objcopy
Source raw mode: 120000
Source filetype: 120000
Setting permissions: Permissions(FilePermissions { mode: 0o120000 (l---------) })
Permission mode to set: 120000
Raw permission bits: 120000
File type bits being set: 120000
Permission bits being set: 0
WARNING: Attempting to set symlink file type (120000) on regular file!
WARNING: Setting zero permission bits will make file inaccessible!
Destination permissions after set_permissions: 100000
```
## Solution
After canonicalizing a symlink path, fetch the metadata of the target file instead of continuing to use the symlink's metadata. This ensures:
- Correct file type detection
- Proper permission bits for the target file
- Maintains existing behavior for non-symlink cases
## Testing
Verified fix resolves permission errors:
```
rustc> llvm-strip: Original metadata mode: 120000, is_symlink: true
rustc> llvm-strip: Target metadata mode after fix: 100555
rustc> llvm-strip: Final permissions mode: 100555
```
|
|
|
|
implement new `x` flag: `--skip-std-check-if-no-download-rustc`
One of our developers (``@RalfJung)`` [reported](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606)[#t-infra/bootstrap > Surprising stages for check build after stage reorg](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606) that working on both the compiler and the library simultaneously with RA enabled is extremely difficult because checking library creates a heavy load on machines (by building stage1 compiler) on each modification. `--skip-std-check-if-no-download-rustc` flag is intended to reduce this heavy load on their IDE integration as much as possible.
Fixes: rust-lang/rust#141955
|
|
update rust offload bootstrap
r? ``@ghost``
|
|
redesign stage 0 std follow-ups part2
Fixes three bugs:
1. `x check` fails when run on rustdoc without `download-rustc` enabled. (1st commit)
2. `x check` fails when run on the compiler with `download-rustc` enabled. (2nd commit)
3. `x test library` fails with `download-rustc` enabled. (3rd commit)
Fixes rust-lang/rust#142018 (case 1)
Fixes https://github.com/rust-lang/rust/issues/141983 (case 3)
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
In StdLink::run we subsequently recursively copy the initial sysroot
lib directory into the stage0-sysroot lib directory. If the initial
sysroot is a toolchain that includes the `rust-src` component (in
lib/rustlib/src/rust), if we add this symlink, that recursive copy
will overwrite the repo sources with the toolchain's sources.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#141724 (fix(rust-lang/rust#141141): When expanding `PartialEq`, check equality of scalar types first.)
- rust-lang/rust#141833 (`tests/ui`: A New Order [2/N])
- rust-lang/rust#141861 (Switch `x86_64-msvc-{1,2}` back to Windows Server 2025 images)
- rust-lang/rust#141914 (redesign stage 0 std follow-ups)
- rust-lang/rust#141918 (Deconstruct values in the THIR visitor)
- rust-lang/rust#141923 (Update books)
- rust-lang/rust#141931 (Deconstruct values in the THIR visitor)
- rust-lang/rust#141956 (Remove two trait methods from cg_ssa)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Use ccache for stage0 tool builds
Now after the stage0 redesign, we can actually start ccaching the build of the compiler itself. We can also cache the bootstrap tools, since these are also built with the stage0 compiler.
Stage0 compiler builds are now being cached: https://github.com/rust-lang/rust/actions/runs/15397246267#summary-43321151192 (`..bootstrap::core::build_steps::compile::Rustc 483.10s 40.41s -91.6%`). It's not a gigantic win everywhere, but it should help. It seems to make the Linux jobs ~10 minute faster. It should be especially useful on PR builds after https://github.com/rust-lang/rust/pull/141948.
r? `@jieyouxu`
try-job: `x86_64-gnu-llvm-19*`
try-job: `x86_64-msvc*`
try-job: `x86_64-apple*`
try-job: `dist-x86_64-linux`
|
|
redesign stage 0 std follow-ups
Various follow-ups pointed out on Zulip during post-merge discussions of [redesign stage 0 std #119899](https://github.com/rust-lang/rust/pull/119899).
r? `@jieyouxu`
Fixes https://github.com/rust-lang/rust/issues/141902.
Fixes https://github.com/rust-lang/rust/issues/141905.
cc `@jyn514`
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
move `test-float-parse` tool into `src/tools` dir
Obviously `test-float-parse` is a tool like any other in `src/tools`.
cc `@tgross35`
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
|
|
|