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. |
|
| build.compile("libcompiler-rt.a"); | ||
| // TEMP: print OUT_DIR so we can grab the .a before cleanup | ||
| let out = env::var("OUT_DIR").unwrap(); | ||
| eprintln!("COMPILER_RT_OUT_DIR={}", out); |
There was a problem hiding this comment.
Reminder to remove this before merging.
There was a problem hiding this comment.
yes, can we try a windows run on this?
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