-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
compiler-builtins: pass -fdebug-compilation-dir=. to fix S_OBJNAME reproducibility on Windows #157914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paradoxicalguy
wants to merge
1
commit into
rust-lang:main
Choose a base branch
from
paradoxicalguy:compiler-builtins-objname-reproducibility
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+120
−0
Open
compiler-builtins: pass -fdebug-compilation-dir=. to fix S_OBJNAME reproducibility on Windows #157914
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite a lot of logic to have in a build script. Could we put this functionality into rustc somehow and access it with a flag?
View changes since the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wasn't sure where the right abstraction would be, since this archive is produced by the external C toolchain rather than by rustc's own archive generation. were you picturing a rustc/bootstrap mechanism that build scripts could opt into, or something else? i'd definitely prefer moving the logic out of the build script if there's a cleaner/preferable place for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry right, I was thinking this was for the Rust bits.
Is the summary basically that we need an archive where
lib.exeis invoked with relative paths rather than absolute? This feels like an option thatccmight be able to handle, especially if it's going to be useful elsewhere. Maybe it should even be the default?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh shoot, this didnt appear when i loaded the website, but answers my zulip q, and that sounds like a better/cleaner approach, tho i dont know well enough about cc-rs atp, i'll get on it and happy to test it against this fix,
not sure about the api design rn tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a link to the Zulip thread? I haven't seen it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, after thinking about this some more, could we use
ar_archive_writerincompiler_builtins? If the goal is reproducibility then that's our most stable option since it's fully under our control.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that seems interesting, i haven't tried or even thought of that
im happy to experiment and try that fix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thought, that seems reasonable to me.
@paradoxicalguy I think you're probably already aware but any kind of build system changes for c-b should go via the c-b repo, quite a bit more gets tested there. Or at least tested in a draft PR there if you want to write a run-make test here.
(There's also
symcheckin that repo that could probably be extended for testing)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, maybe that's also something that could be done in
ccif a Cargo feature is enabled? Assuming whatever build script pattern we come up with would probably have to be duplicated anywhere else that cares about reproduceability, that would make it easier to share.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll experiment with
ar_archive_writerincompiler-builtinsfirst and see how well it fits. if it ends up being a generally useful approach rather than somethingcompiler-builtins-specific, we can revisit whether it makes sense to expose it throughcc-rsand yes, i'll open in c-b if we go ahead that way :D