summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2020-04-09 01:48:29 -0700
committerGitHub <noreply@github.com>2020-04-09 10:48:29 +0200
commit75640f0ed90763d6d316e6b78f7a6eec9ff8b1ec (patch)
tree66c68f74b299d51c2a8e7a20d12493aa082c562c
parent6d8a59be5bd6559219cc953bad54fb4bf65fbae8 (diff)
downloadspack-75640f0ed90763d6d316e6b78f7a6eec9ff8b1ec.tar.gz
spack-75640f0ed90763d6d316e6b78f7a6eec9ff8b1ec.tar.bz2
spack-75640f0ed90763d6d316e6b78f7a6eec9ff8b1ec.tar.xz
spack-75640f0ed90763d6d316e6b78f7a6eec9ff8b1ec.zip
NAG compiler fix: skip implicit RPATH detection (#15902)
* Skip collection of compiler link paths if compiler does not define a verbose flag * modules config bug: allow user to configure a compiler without an explicit entry for loaded modules
-rw-r--r--lib/spack/spack/compiler.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
index 36a2704eac..9fc7aa51a2 100644
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -250,13 +250,13 @@ class Compiler(object):
PrgEnv_compiler = None
def __init__(self, cspec, operating_system, target,
- paths, modules=[], alias=None, environment=None,
+ paths, modules=None, alias=None, environment=None,
extra_rpaths=None, enable_implicit_rpaths=None,
**kwargs):
self.spec = cspec
self.operating_system = str(operating_system)
self.target = target
- self.modules = modules
+ self.modules = modules or []
self.alias = alias
self.extra_rpaths = extra_rpaths
self.enable_implicit_rpaths = enable_implicit_rpaths
@@ -317,6 +317,10 @@ class Compiler(object):
first_compiler = next((c for c in paths if c), None)
if not first_compiler:
return []
+ if not cls.verbose_flag():
+ # In this case there is no mechanism to learn what link directories
+ # are used by the compiler
+ return []
try:
tmpdir = tempfile.mkdtemp(prefix='spack-implicit-link-info')