summaryrefslogtreecommitdiff
path: root/lib/spack/spack/cmd/compiler.py
diff options
context:
space:
mode:
authorscheibelp <scheibel1@llnl.gov>2017-03-16 11:24:34 -0700
committerbecker33 <becker33@llnl.gov>2017-03-16 11:24:34 -0700
commit9a27dec8e878debe81bd4ab08dfcf8964c4e9e4a (patch)
tree4458e88299ca12013f04c97cf9c2482c70d6d2c4 /lib/spack/spack/cmd/compiler.py
parent99ef28b5d247ac9cbd907034fadc33e00c98e6ae (diff)
downloadspack-9a27dec8e878debe81bd4ab08dfcf8964c4e9e4a.tar.gz
spack-9a27dec8e878debe81bd4ab08dfcf8964c4e9e4a.tar.bz2
spack-9a27dec8e878debe81bd4ab08dfcf8964c4e9e4a.tar.xz
spack-9a27dec8e878debe81bd4ab08dfcf8964c4e9e4a.zip
Dont auto-init compiler conf for 'compiler find' (#3439)
Fixes #3428 Users can run 'spack compiler find' to automatically initialize their compilers.yaml configuration file. It also turns out that Spack will implicitly initialize the compilers configuration file as part of detecting compilers if none are found (so if a user were to attempt to concretize a spec without running 'spack compiler find' it would not fail). However, in this case Spack was overlooking its own implicit initialization of the config files and would report that no new compilers were found. This commit removes implicit initialization when the user calls 'spack compiler find'. This did not surface until #2999 because the 'spack compiler' command defaulted to using a scope 'user/platform' that was not accounted for in get_compiler_config (where the implicit initialization logic predates the addition of this new scope); #2999 removed the scope specification when checking through config files, leading to the implicit initialization.
Diffstat (limited to 'lib/spack/spack/cmd/compiler.py')
-rw-r--r--lib/spack/spack/cmd/compiler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py
index 444e658a92..9601c5ba65 100644
--- a/lib/spack/spack/cmd/compiler.py
+++ b/lib/spack/spack/cmd/compiler.py
@@ -95,8 +95,8 @@ def compiler_find(args):
new_compilers = []
for c in compilers:
arch_spec = ArchSpec(None, c.operating_system, c.target)
- same_specs = spack.compilers.compilers_for_spec(c.spec,
- arch_spec)
+ same_specs = spack.compilers.compilers_for_spec(
+ c.spec, arch_spec, init_config=False)
if not same_specs:
new_compilers.append(c)