Fixed arch setting variants. Activate cray arch automatically. (#11203)

This commit is contained in:
wspear 2019-08-02 13:14:43 -07:00 committed by Greg Becker
parent 0e532d324c
commit 9dd61f5313

View File

@ -64,6 +64,7 @@ class Tau(Package):
variant('craycnl', default=False, description='Build for Cray compute nodes')
variant('bgq', default=False, description='Build for IBM BlueGene/Q compute nodes')
variant('ppc64le', default=False, description='Build for IBM Power LE nodes')
variant('x86_64', default=False, description='Force build for x86 Linux instead of auto-detect')
depends_on('pdt', when='+pdt') # Required for TAU instrumentation
depends_on('scorep', when='+scorep')
@ -133,6 +134,21 @@ def install(self, spec, prefix):
options = ["-prefix=%s" % prefix,
"-iowrapper"]
if '+craycnl' in spec:
options.append('-arch=craycnl')
if '+bgq' in spec:
options.append('-arch=bgq')
if '+ppc64le' in spec:
options.append('-arch=ibm64linux')
if '+x86_64' in spec:
options.append('-arch=x86_64')
if ('platform=cray' in self.spec) and ('+x86_64' not in spec):
options.append('-arch=craycnl')
if '+pdt' in spec:
options.append("-pdt=%s" % spec['pdt'].prefix)