You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The changes from #113492 have introduced a source of non-determinism in our rustc invocations, which causes cache invalidations for us in Buck since the output often changes hashes.
The root issue here seems to be that LF_BUILDINFO now contains an absolute path to rustc.exe, which is not consistent for our use-case in Meta (our build machines use https://github.com/facebook/dotslash in order to download rustc to a temporary directory which is not stable across hosts). The LF_BUILDINFO entry is present in every rlib artifact we produce.
The changes from #113492 have introduced a source of non-determinism in our rustc invocations, which causes cache invalidations for us in Buck since the output often changes hashes.
The root issue here seems to be that
LF_BUILDINFOnow contains an absolute path torustc.exe, which is not consistent for our use-case in Meta (our build machines use https://github.com/facebook/dotslash in order to downloadrustcto a temporary directory which is not stable across hosts). TheLF_BUILDINFOentry is present in everyrlibartifact we produce.Details
ar x foo.rlibto look at thercgu.ofilesllvm-pdbutil dump -all foo-<hash>.foo.<hash>-cgu.0.rcgu.oContents for our Buck built rlib look like:
The problematic string ends up embedded in the object files within the
rlibarchive, introducing non-determinism in our build outputs.I'd like to adjust this by proposing one of a few ideas:
LF_BUILDINFOto accept a relative path (or user-defined path) to rustc.exe. E.g.-Zbuildinfo_exe_path=rustc.exeor similar.LF_BUILDINFO's command & command line args entirely, reverting back to pre- Add CL and CMD into to pdb debug info #113492 behavior. E.g.-Zomit_buildinfo_argsor similar.Would any of these options make sense to pursue as a PR?