fix: remap ci-llvm debug paths via -ffile-prefix-map#156186
Open
paradoxicalguy wants to merge 2 commits intorust-lang:mainfrom
Open
fix: remap ci-llvm debug paths via -ffile-prefix-map#156186paradoxicalguy wants to merge 2 commits intorust-lang:mainfrom
-ffile-prefix-map#156186paradoxicalguy wants to merge 2 commits intorust-lang:mainfrom
Conversation
bjorn3
reviewed
May 5, 2026
bjorn3
reviewed
May 5, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
ci-llvm include paths were leaking into debuginfo of `librustc_driver` via C/C++ compilation in rustc_llvm, causing non-determinism across stage2 builds. extend debug path remapping to the C/C++ build in rustc_llvm by converting RUSTC_DEBUGINFO_MAP into corresponding -fdebug-prefix-map flags and passing them through cc::Build.
d1eccd5 to
6a19534
Compare
Contributor
Author
|
knew i had it in me to pass tidy 🥹 |
Urgau
reviewed
May 5, 2026
Member
|
@rustbot author |
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
Contributor
Author
|
@rustbot ready |
-ffile-prefix-map
Member
|
I've update the title of the PR to better reflect the flag used. @bors r+ |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
May 5, 2026
…remap2, r=Urgau fix: remap ci-llvm debug paths via `-ffile-prefix-map` ### problem: ci-llvm include paths leak into debuginfo of `librustc_driver` via C/C++ compilation in `rustc_llvm` , causing non-determinism across two stage2 hermetic builds. this exhibits as suffixes differing in `anon.*.llvm.<hash>` and mismatched GNU Build IDs, this persists even after stripping the debuginfo. `remap-debuginfo` does not cover this, it only applies to rustc and not to C/C++ compiler. ### fix: extend debug path remapping to the C/C++ build in `rustc_llvm` by converting `RUSTC_DEBUGINFO_MAP` into corresponding `-fdebug-prefix-map` flags and passing them through `cc::Build`. **this is a targeted fix in rustc_llvm; a more general solution would involve propagating remap flags across rustc <-> cargo <-> build scripts.** r? @Urgau
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
May 5, 2026
…remap2, r=Urgau fix: remap ci-llvm debug paths via `-ffile-prefix-map` ### problem: ci-llvm include paths leak into debuginfo of `librustc_driver` via C/C++ compilation in `rustc_llvm` , causing non-determinism across two stage2 hermetic builds. this exhibits as suffixes differing in `anon.*.llvm.<hash>` and mismatched GNU Build IDs, this persists even after stripping the debuginfo. `remap-debuginfo` does not cover this, it only applies to rustc and not to C/C++ compiler. ### fix: extend debug path remapping to the C/C++ build in `rustc_llvm` by converting `RUSTC_DEBUGINFO_MAP` into corresponding `-fdebug-prefix-map` flags and passing them through `cc::Build`. **this is a targeted fix in rustc_llvm; a more general solution would involve propagating remap flags across rustc <-> cargo <-> build scripts.** r? @Urgau
rust-bors Bot
pushed a commit
that referenced
this pull request
May 5, 2026
Rollup of 12 pull requests Successful merges: - #155341 (generic_const_args: allow paths to non type consts) - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`) - #156159 ([AIX] add -bdbg:namedsects:ss link arg) - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports) - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`) - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`) - #156201 (Don't run ui-fulldeps tests twice in stage 1) - #155808 (Always use `ConstFn` context for `const` closures) - #156105 (interpret: correctly deal with repr(transparent) enums) - #156148 (Use `all_impls` instead of handrolling it) - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+) - #156205 (move generalization test)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
May 6, 2026
…remap2, r=Urgau fix: remap ci-llvm debug paths via `-ffile-prefix-map` ### problem: ci-llvm include paths leak into debuginfo of `librustc_driver` via C/C++ compilation in `rustc_llvm` , causing non-determinism across two stage2 hermetic builds. this exhibits as suffixes differing in `anon.*.llvm.<hash>` and mismatched GNU Build IDs, this persists even after stripping the debuginfo. `remap-debuginfo` does not cover this, it only applies to rustc and not to C/C++ compiler. ### fix: extend debug path remapping to the C/C++ build in `rustc_llvm` by converting `RUSTC_DEBUGINFO_MAP` into corresponding `-fdebug-prefix-map` flags and passing them through `cc::Build`. **this is a targeted fix in rustc_llvm; a more general solution would involve propagating remap flags across rustc <-> cargo <-> build scripts.** r? @Urgau
rust-bors Bot
pushed a commit
that referenced
this pull request
May 6, 2026
Rollup of 15 pull requests Successful merges: - #151122 (fix: more descriptive error message for enum to integer) - #155341 (generic_const_args: allow paths to non type consts) - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`) - #156159 ([AIX] add -bdbg:namedsects:ss link arg) - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports) - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`) - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`) - #156201 (Don't run ui-fulldeps tests twice in stage 1) - #155808 (Always use `ConstFn` context for `const` closures) - #156105 (interpret: correctly deal with repr(transparent) enums) - #156148 (Use `all_impls` instead of handrolling it) - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+) - #156170 (add known-bug test for coroutine 'static-yields-non-'static unsoundness (#144442)) - #156195 (Move tests codegen) - #156205 (move generalization test)
rust-bors Bot
pushed a commit
that referenced
this pull request
May 6, 2026
Rollup of 15 pull requests Successful merges: - #151122 (fix: more descriptive error message for enum to integer) - #155341 (generic_const_args: allow paths to non type consts) - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`) - #156159 ([AIX] add -bdbg:namedsects:ss link arg) - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports) - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`) - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`) - #156201 (Don't run ui-fulldeps tests twice in stage 1) - #155808 (Always use `ConstFn` context for `const` closures) - #156105 (interpret: correctly deal with repr(transparent) enums) - #156148 (Use `all_impls` instead of handrolling it) - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+) - #156170 (add known-bug test for coroutine 'static-yields-non-'static unsoundness (#144442)) - #156195 (Move tests codegen) - #156205 (move generalization test)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
problem:
ci-llvm include paths leak into debuginfo of
librustc_drivervia C/C++ compilation inrustc_llvm, causing non-determinism across two stage2 hermetic builds.this exhibits as suffixes differing in
anon.*.llvm.<hash>and mismatched GNU Build IDs, this persists even after stripping the debuginfo.remap-debuginfodoes not cover this, it only applies to rustc and not to C/C++ compiler.fix:
extend debug path remapping to the C/C++ build in
rustc_llvmby convertingRUSTC_DEBUGINFO_MAPinto corresponding-fdebug-prefix-mapflags and passing them throughcc::Build.this is a targeted fix in rustc_llvm; a more general solution would involve propagating remap flags across rustc <-> cargo <-> build scripts.
r? @Urgau