Commit 841c962
committed
Switch pipelining metadata action to hollow rlib (-Zno-codegen)
Replace the --rustc-quit-on-rmeta / .rmeta approach with Buck2-style
hollow rlibs: the RustcMetadata action runs rustc to completion with
-Zno-codegen, emitting a .rlib archive (named -hollow.rlib) that
contains only metadata and optimized MIR.
Key fixes:
- Main Rustc action uses full rlib --extern deps so the SVH embedded
in the full rlib matches what downstream binaries expect (avoiding
E0460 with non-deterministic proc macros).
- RUSTC_BOOTSTRAP=1 is set on both actions: it changes the crate hash,
so inconsistent use would cause SVH mismatch even for deterministic
crates.
- -Ldependency= points to the _hollow/ subdirectory so the full rlib
and hollow rlib never appear in the same search path (avoids E0463).
- transitive_metadata_outputs are always included in the sandbox so
rustc can resolve transitive -Ldependency= references.
Adds an SVH mismatch test that demonstrates the problem with
non-deterministic proc macros (uses a HashMap-based derive macro whose
output varies by OS-seeded random seed).1 parent 90a19fa commit 841c962
10 files changed
Lines changed: 473 additions & 84 deletions
File tree
- cargo
- rust
- private
- settings
- test/unit/pipelined_compilation
- svh_mismatch
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
208 | 212 | | |
209 | | - | |
210 | | - | |
| 213 | + | |
211 | 214 | | |
212 | 215 | | |
| 216 | + | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
| |||
0 commit comments