Skip to content

-ffile-prefix-map=<staging>=. injection in compiler-wrapper#19

Open
SebastianPaucar wants to merge 1 commit into
spack:mainfrom
SebastianPaucar:feature/debug-prefix-map
Open

-ffile-prefix-map=<staging>=. injection in compiler-wrapper#19
SebastianPaucar wants to merge 1 commit into
spack:mainfrom
SebastianPaucar:feature/debug-prefix-map

Conversation

@SebastianPaucar

Copy link
Copy Markdown

This PR adds SPACK_DEBUG_PREFIX_MAP, which allows the compiler wrapper to inject -ffile-prefix-map=<staging>=. into cc.sh ONLY when SPACK_DEBUG_PREFIX_MAP is set, so that debug information no longer contains the temporary Spack staging directory, replacing it with a relative (.) path instead, avoiding leakage of temporary build paths, and making binaries more reproducible. The new test added in test/run.sh verifies that the flag is added only when expected for the C, C++, and Fortran wrappers.

Companion PRs for both spack-packages and the main spack repos will be submitted separately.

@haampie, could you please take a look when you have a chance?

…tests added in test/run.sh (test_debug_prefix_map)

Signed-off-by: SebastianPaucar <paucar.sebastian@hotmail.com>
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.

1 participant