Skip to content
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

Add deterministic prefix in Library.get_flags() (NFC) #23225

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Dec 19, 2024

This factors duplicate routines to add deterministic prefix paths out to Library.get_cflags(). Suggested in
#23222 (comment).

This factors duplicate routines to add deterministic prefix paths out to
`Library.get_cflags()`. Suggested in
emscripten-core#23222 (comment).
source_dir = utils.path_from_root()
if self.batch_inputs:
relative_source_dir = os.path.relpath(source_dir, build_dir)
cflags += [f'-ffile-prefix-map={relative_source_dir}={DETERMINISITIC_PREFIX}']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make these two lines unconditional and avoid the need for the new self.batch_inputs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any other comments?

@aheejin aheejin merged commit 74d95fb into emscripten-core:main Dec 20, 2024
29 checks passed
@aheejin aheejin deleted the deterministic_prefix_cflags branch December 20, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants