forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packages: use "requires" to allow only selected compilers (spack#40567)
A few packages have encoded an idiom that pre-dates the introduction of the 'requires' directive, and they cycle over all compilers to conflict with the ones that are not supported. Here instead we reverse the logic, and require the ones that are supported.
- Loading branch information
Showing
12 changed files
with
34 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
import glob | ||
import os | ||
|
||
import spack.compilers | ||
import spack.paths | ||
import spack.user_environment | ||
from spack.package import * | ||
|
@@ -53,28 +52,26 @@ class ClingoBootstrap(Clingo): | |
depends_on("[email protected]:", type="build") | ||
|
||
# On Linux we bootstrap with GCC or clang | ||
for compiler_spec in [ | ||
c for c in spack.compilers.supported_compilers() if c not in ("gcc", "clang") | ||
]: | ||
conflicts( | ||
"%{0}".format(compiler_spec), | ||
when="platform=linux", | ||
msg="GCC or clang are required to bootstrap clingo on Linux", | ||
) | ||
conflicts( | ||
"%{0}".format(compiler_spec), | ||
when="platform=cray", | ||
msg="GCC or clang are required to bootstrap clingo on Cray", | ||
) | ||
requires( | ||
"%gcc", | ||
"%clang", | ||
when="platform=linux", | ||
msg="GCC or clang are required to bootstrap clingo on Linux", | ||
) | ||
requires( | ||
"%gcc", | ||
"%clang", | ||
when="platform=cray", | ||
msg="GCC or clang are required to bootstrap clingo on Cray", | ||
) | ||
conflicts("%gcc@:5", msg="C++14 support is required to bootstrap clingo") | ||
|
||
# On Darwin we bootstrap with Apple Clang | ||
for compiler_spec in [c for c in spack.compilers.supported_compilers() if c != "apple-clang"]: | ||
conflicts( | ||
"%{0}".format(compiler_spec), | ||
when="platform=darwin", | ||
msg="Apple-clang is required to bootstrap clingo on MacOS", | ||
) | ||
requires( | ||
"%apple-clang", | ||
when="platform=darwin", | ||
msg="Apple-clang is required to bootstrap clingo on MacOS", | ||
) | ||
|
||
# Clingo needs the Python module to be usable by Spack | ||
conflicts("~python", msg="Python support is required to bootstrap Spack") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters