summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGregory Becker <becker33@llnl.gov>2016-05-05 17:49:30 -0700
committerGregory Becker <becker33@llnl.gov>2016-05-05 17:49:30 -0700
commit9a39ccea8faf6eb126bcc3c28a3f0ac696681f04 (patch)
treeffbe8b2ecf550cc79ce6c317d8bbaaabf910a279 /lib
parent1bb7bfaf7f8a2b8725d226f1ea2931c82178a7e9 (diff)
downloadspack-9a39ccea8faf6eb126bcc3c28a3f0ac696681f04.tar.gz
spack-9a39ccea8faf6eb126bcc3c28a3f0ac696681f04.tar.bz2
spack-9a39ccea8faf6eb126bcc3c28a3f0ac696681f04.tar.xz
spack-9a39ccea8faf6eb126bcc3c28a3f0ac696681f04.zip
Every old spec has empty compiler flags
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/spec.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 7faefabf00..0ccef6a5e5 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -756,13 +756,15 @@ class Spec(object):
"""
yaml_text = yaml.dump(
self.to_node_dict(), default_flow_style=True, width=sys.maxint)
+ print yaml_text
sha = hashlib.sha1(yaml_text)
return base64.b32encode(sha.digest()).lower()[:length]
def to_node_dict(self):
params = dict( (name, v.value) for name, v in self.variants.items() )
- params.update( dict( (name, value) for name, value in self.compiler_flags.items()) )
+ params.update( dict( (name, []) for name in FlagMap.valid_compiler_flags() ) )
+ params.update( dict( (name, value) for name, value in self.compiler_flags.items()) ) #override
d = {
'parameters' : params,
'arch' : self.architecture,
@@ -817,8 +819,8 @@ class Spec(object):
elif 'variants' in node:
for name, value in node['variants'].items():
spec.variants[name] = VariantSpec(name, value)
-# for name in FlagMap.valid_compiler_flags():
-# spec.compiler_flags[name] = []
+ for name in FlagMap.valid_compiler_flags():
+ spec.compiler_flags[name] = []
else:
raise SpackRecordError("Did not find a valid format for variants in YAML file")