summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaryl W. Grunau <DarylGrunau@gmail.com>2019-02-21 14:43:29 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2019-02-21 15:43:29 -0600
commit4f5be841d4dfa403978763cc555e35324d68fdd8 (patch)
treeacc57c4469af5fc8193c83b17027512e13cc2d8a
parent5600c9f0d98f620c5ac57f24cd3c8fffee9d0a47 (diff)
downloadspack-4f5be841d4dfa403978763cc555e35324d68fdd8.tar.gz
spack-4f5be841d4dfa403978763cc555e35324d68fdd8.tar.bz2
spack-4f5be841d4dfa403978763cc555e35324d68fdd8.tar.xz
spack-4f5be841d4dfa403978763cc555e35324d68fdd8.zip
gcc package: skip nvptx_install for gcc~nvptx (#10672)
The nvptx installation support phase (added in 040b658) was always running for gcc regardless of whether +nvptx was enabled. This removes the "@when" syntax (which apparently is not working) and adds a check inside of the "nvptx_install" function to bail out if +nvptx is not enabled.
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index 57d3ece2c8..f618d0f86e 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -315,12 +315,14 @@ class Gcc(AutotoolsPackage):
# run configure/make/make(install) for the nvptx-none target
# before running the host compiler phases
- @when('+nvptx')
@run_before('configure')
def nvptx_install(self):
spec = self.spec
prefix = self.prefix
+ if not spec.satisfies('+nvptx'):
+ return
+
# config.guess returns the host triple, e.g. "x86_64-pc-linux-gnu"
guess = Executable('./config.guess')
targetguess = guess(output=str).rstrip('\n')