compiler-builtins: pass -fdebug-compilation-dir=. to fix S_OBJNAME reproducibility on Windows#157914
Conversation
…producibility on Windows
|
cc @tgross35 |
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
|
@bors try job=dist-x86_64-msvc |
This comment has been minimized.
This comment has been minimized.
…oducibility, r=<try> compiler-builtins: pass -fdebug-compilation-dir=. to fix S_OBJNAME reproducibility on Windows try-job: dist-x86_64-msvc
|
where can i download the |
|
You can use rustup-toolchain-install-master I think you can do something like |
IIRC you should be able to use something like |
|
thanks to both of you, i checked in downloaded artifact, sadly patch didn't work, |
|
Is this something that you can figure out by inspecting the object file? If so, you could create a PR to the compiler-builtins repo adding a failing test to https://github.com/rust-lang/compiler-builtins/blob/fb48f81544cf29e6ff7fb4468c8b2e1dacd42b79/crates/symbol-check/src/main.rs then messing around to see what flags get it to pass. Might be easier than repeating the try build process here. Why does this only apply to Windows, though, and only compiler-builtins? I'd expect other platforms to get the same paths in their debug info. |
|
(a) yes, i found the current problem by inspecting an object file, extracting |
|
it works w |
|
the objname issue is resolved when checked manually but compiler-builtins still comes as non-deterministic in the repro check run i did. archive still contains absolute build paths (e.g. the |
View all comments
compiler_builtins.rlibdiffers between builds because clang-cl embeds the absolute object output path into theS_OBJNAMEcodeview record.the path comes from cc-rs passing an absolute
/Foargument (derived from cargo'sOUT_DIR) toaddDebugObjectName(), which llvm then writes verbatim into.debug$S.minimal repro:
-fdebug-compilation-dir=.makesS_OBJNAMEemit a relative path instead.needs CI verification on a windows dist job since local builds use cl.exe rather than the bundled clang-cl. this pr is only for testing