prepend compiler bindir to PATH lower priority than wrapper
This commit is contained in:
parent
68874a72fb
commit
55ac6fb542
@ -423,6 +423,14 @@ def set_wrapper_variables(pkg, env):
|
|||||||
compiler = pkg.compiler
|
compiler = pkg.compiler
|
||||||
env.extend(spack.schema.environment.parse(compiler.environment))
|
env.extend(spack.schema.environment.parse(compiler.environment))
|
||||||
|
|
||||||
|
# Before setting up PATH to Spack compiler wrappers, make sure compiler is in PATH
|
||||||
|
# This ensures that non-wrapped executables from the compiler bin directory are available
|
||||||
|
bindirs = dedupe(
|
||||||
|
[os.path.dirname(c) for c in [compiler.cc, compiler.cxx, compiler.fc, compiler.f77]]
|
||||||
|
)
|
||||||
|
for bindir in bindirs:
|
||||||
|
env.prepend_path("PATH", bindir)
|
||||||
|
|
||||||
if compiler.extra_rpaths:
|
if compiler.extra_rpaths:
|
||||||
extra_rpaths = ":".join(compiler.extra_rpaths)
|
extra_rpaths = ":".join(compiler.extra_rpaths)
|
||||||
env.set("SPACK_COMPILER_EXTRA_RPATHS", extra_rpaths)
|
env.set("SPACK_COMPILER_EXTRA_RPATHS", extra_rpaths)
|
||||||
|
Loading…
Reference in New Issue
Block a user