From 75640f0ed90763d6d316e6b78f7a6eec9ff8b1ec Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 9 Apr 2020 01:48:29 -0700 Subject: 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 --- lib/spack/spack/compiler.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') 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') -- cgit v1.2.3-60-g2f50