summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2021-06-22 16:37:07 -0700
committerGitHub <noreply@github.com>2021-06-22 23:37:07 +0000
commit2db858e9c4fc16db4051004e4cca8b11154a3d22 (patch)
tree9612463879df135ffae97400a156631daee4015a /lib
parent4da0561496c9230eab48a8c195ab49bb835cf8a7 (diff)
downloadspack-2db858e9c4fc16db4051004e4cca8b11154a3d22.tar.gz
spack-2db858e9c4fc16db4051004e4cca8b11154a3d22.tar.bz2
spack-2db858e9c4fc16db4051004e4cca8b11154a3d22.tar.xz
spack-2db858e9c4fc16db4051004e4cca8b11154a3d22.zip
filter_compiler_wrappers: include realpath of compiler wrappers (#24456)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/mixins.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/mixins.py b/lib/spack/spack/mixins.py
index be13e3ea3a..ee1f57c91d 100644
--- a/lib/spack/spack/mixins.py
+++ b/lib/spack/spack/mixins.py
@@ -190,7 +190,11 @@ def filter_compiler_wrappers(*files, **kwargs):
]
for env_var, compiler_path in replacements:
if env_var in os.environ:
- x.filter(os.environ[env_var], compiler_path, **filter_kwargs)
+ # filter spack wrapper and links to spack wrapper in case
+ # build system runs realpath
+ wrapper = os.environ[env_var]
+ for wrapper_path in (wrapper, os.path.realpath(wrapper)):
+ x.filter(wrapper_path, compiler_path, **filter_kwargs)
# Remove this linking flag if present (it turns RPATH into RUNPATH)
x.filter('{0}--enable-new-dtags'.format(self.compiler.linker_arg), '',