Skip to content

Commit db3ed8e

Browse files
set SPACK_DEBUG_PREFIX_MAP for reproducible DWARF paths (companion to spack/compiler-wrapper/pull/19)
Signed-off-by: SebastianPaucar <paucar.sebastian@hotmail.com>
1 parent f458359 commit db3ed8e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • repos/spack_repo/builtin/packages/compiler_wrapper

repos/spack_repo/builtin/packages/compiler_wrapper/package.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@ def setup_dependent_build_environment(
229229
extra_rpaths = dedupe(extra_rpaths)
230230
env.set("SPACK_COMPILER_EXTRA_RPATHS", ":".join(extra_rpaths))
231231

232+
# Set SPACK_DEBUG_PREFIX_MAP to the staging path
233+
# Develop packages are excluded
234+
if not dependent_spec.variants.get("dev_path"):
235+
try:
236+
staging_src = dependent_spec.package.stage.source_path
237+
env.set("SPACK_DEBUG_PREFIX_MAP", staging_src)
238+
except Exception:
239+
# Stage not yet set up
240+
pass
241+
232242
env.set("SPACK_ENABLE_NEW_DTAGS", self.enable_new_dtags)
233243
env.set("SPACK_DISABLE_NEW_DTAGS", self.disable_new_dtags)
234244

0 commit comments

Comments
 (0)