only filter compiler paths for binaries provided by the compiler (#7369)

This commit is contained in:
scheibelp 2018-03-05 05:43:43 -08:00 committed by Massimiliano Culpo
parent ca336b60fa
commit 8b0552bc23

View file

@ -195,10 +195,15 @@ def _filter_compiler_wrappers_impl(self):
x = llnl.util.filesystem.FileFilter(*abs_files) x = llnl.util.filesystem.FileFilter(*abs_files)
x.filter(os.environ['CC'], self.compiler.cc, **filter_kwargs) replacements = [
x.filter(os.environ['CXX'], self.compiler.cxx, **filter_kwargs) ('CC', self.compiler.cc),
x.filter(os.environ['F77'], self.compiler.f77, **filter_kwargs) ('CXX', self.compiler.cxx),
x.filter(os.environ['FC'], self.compiler.fc, **filter_kwargs) ('F77', self.compiler.f77),
('FC', self.compiler.fc)
]
for env_var, compiler_path in replacements:
if env_var in os.environ:
x.filter(os.environ[env_var], compiler_path, **filter_kwargs)
# Remove this linking flag if present (it turns RPATH into RUNPATH) # Remove this linking flag if present (it turns RPATH into RUNPATH)
x.filter('-Wl,--enable-new-dtags', '', **filter_kwargs) x.filter('-Wl,--enable-new-dtags', '', **filter_kwargs)