Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Strip build directory prefix in the __FILE__ macro #664

Merged
merged 1 commit into from
Jun 17, 2021
Merged

Strip build directory prefix in the __FILE__ macro #664

merged 1 commit into from
Jun 17, 2021

Conversation

danieldk
Copy link
Contributor

Various macros use __FILE__ to embed the source file name in
errors/logs. However, the full path is encoder, making reproducible
builds harder.

This change uses the `-fmacro-prefix-map`` of GCC >= 8.0 and clang >= 10.0 to
remove the source directory prefix. Since only the prefix is removed, the
relevant source file names are still included.

Background:
https://reproducible-builds.org/docs/build-path/

Various macros use __FILE__ to embed the source file name in
errors/logs. However, the full path is encoder, making reproducible
builds harder.

This change uses the -fmacro-prefix-map of GCC >= 8.0 and clang >= 10.0
to remove the source directory prefix. Since only the prefix is removed,
the relevant source file names are still included.

Background:
https://reproducible-builds.org/docs/build-path/
@taku910 taku910 merged commit d8711f5 into google:master Jun 17, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants