Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions repos/spack_repo/builtin/build_systems/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _supports_compilation_databases(pkg: PackageBase) -> bool:
"""Check if this package (and CMake) can support compilation databases."""

# CMAKE_EXPORT_COMPILE_COMMANDS only exists for CMake >= 3.5
if not pkg.spec.satisfies("^cmake@3.5:"):
if not pkg.spec.satisfies("%cmake@3.5:"):
return False

# CMAKE_EXPORT_COMPILE_COMMANDS is only implemented for Makefile and Ninja generators
Expand Down Expand Up @@ -205,7 +205,7 @@ class CMakePackage(PackageBase):
variant(
"ipo",
default=False,
when="^cmake@3.9:",
when="%cmake@3.9:",
description="CMake interprocedural optimization",
)

Expand Down Expand Up @@ -613,7 +613,7 @@ def define_hip_architectures(pkg: PackageBase) -> str:
not set.

"""
if "amdgpu_target" in pkg.spec.variants and pkg.spec.satisfies("^cmake@3.21:"):
if "amdgpu_target" in pkg.spec.variants and pkg.spec.satisfies("%cmake@3.21:"):
return define("CMAKE_HIP_ARCHITECTURES", pkg.spec.variants["amdgpu_target"].value)

return ""
Expand All @@ -628,6 +628,6 @@ def define_cuda_architectures(pkg: PackageBase) -> str:
This method is no-op for cmake<3.18 and when ``cuda_arch`` variant is not set.

"""
if "cuda_arch" in pkg.spec.variants and pkg.spec.satisfies("^cmake@3.18:"):
if "cuda_arch" in pkg.spec.variants and pkg.spec.satisfies("%cmake@3.18:"):
return define("CMAKE_CUDA_ARCHITECTURES", pkg.spec.variants["cuda_arch"].value)
return ""
144 changes: 72 additions & 72 deletions repos/spack_repo/builtin/build_systems/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,62 +187,62 @@ def compute_capabilities(arch_list: Iterable[str]) -> List[str]:

# Linux x86_64 compiler conflicts from here:
# https://gist.github.com/ax3l/9489132
with when("^cuda~allow-unsupported-compilers"):
with when("+cuda %cuda~allow-unsupported-compilers"):
# GCC
# According to
# https://github.com/spack/spack/pull/25054#issuecomment-886531664
# these conflicts are valid independently from the architecture

# minimum supported versions
conflicts("%gcc@:4", when="+cuda ^cuda@11.0:")
conflicts("%gcc@:5", when="+cuda ^cuda@11.4:")
conflicts("%clang@:6", when="+cuda ^cuda@12.2:")
conflicts("%gcc@:4", when="%cuda@11.0:")
conflicts("%gcc@:5", when="%cuda@11.4:")
conflicts("%clang@:6", when="%cuda@12.2:")

# maximum supported version
# NOTE:
# in order to not constrain future cuda version to old gcc versions,
# it has been decided to use an upper bound for the latest version.
# This implies that the last one in the list has to be updated at
# each release of a new cuda minor version.
conflicts("%gcc@10:", when="+cuda ^cuda@:11.0")
conflicts("%gcc@11:", when="+cuda ^cuda@:11.4.0")
conflicts("%gcc@11.2:", when="+cuda ^cuda@:11.5")
conflicts("%gcc@12:", when="+cuda ^cuda@:11.8")
conflicts("%gcc@13:", when="+cuda ^cuda@:12.3")
conflicts("%gcc@14:", when="+cuda ^cuda@:12.6")
conflicts("%gcc@15:", when="+cuda ^cuda@:12.9")
conflicts("%gcc@16:", when="+cuda ^cuda@:13.1")
conflicts("%gcc@15:", when="+cuda ^cuda@13.1:")
conflicts("%clang@12:", when="+cuda ^cuda@:11.4.0")
conflicts("%clang@13:", when="+cuda ^cuda@:11.5")
conflicts("%clang@14:", when="+cuda ^cuda@:11.7")
conflicts("%clang@15:", when="+cuda ^cuda@:12.0")
conflicts("%clang@16:", when="+cuda ^cuda@:12.1")
conflicts("%clang@17:", when="+cuda ^cuda@:12.3")
conflicts("%clang@18:", when="+cuda ^cuda@:12.5")
conflicts("%clang@19:", when="+cuda ^cuda@:12.6")
conflicts("%clang@20:", when="+cuda ^cuda@:12.9")
conflicts("%clang@21:", when="+cuda ^cuda@:13.1")
conflicts("%clang@20:", when="+cuda ^cuda@13.1:")
conflicts("%gcc@10:", when="%cuda@:11.0")
conflicts("%gcc@11:", when="%cuda@:11.4.0")
conflicts("%gcc@11.2:", when="%cuda@:11.5")
conflicts("%gcc@12:", when="%cuda@:11.8")
conflicts("%gcc@13:", when="%cuda@:12.3")
conflicts("%gcc@14:", when="%cuda@:12.6")
conflicts("%gcc@15:", when="%cuda@:12.9")
conflicts("%gcc@16:", when="%cuda@:13.1")
conflicts("%gcc@15:", when="%cuda@13.1:")
conflicts("%clang@12:", when="%cuda@:11.4.0")
conflicts("%clang@13:", when="%cuda@:11.5")
conflicts("%clang@14:", when="%cuda@:11.7")
conflicts("%clang@15:", when="%cuda@:12.0")
conflicts("%clang@16:", when="%cuda@:12.1")
conflicts("%clang@17:", when="%cuda@:12.3")
conflicts("%clang@18:", when="%cuda@:12.5")
conflicts("%clang@19:", when="%cuda@:12.6")
conflicts("%clang@20:", when="%cuda@:12.9")
conflicts("%clang@21:", when="%cuda@:13.1")
conflicts("%clang@20:", when="%cuda@13.1:")

# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0")
conflicts("%gcc@5:", when="+cuda ^cuda@:7.5 target=x86_64:")
conflicts("%gcc@6:", when="+cuda ^cuda@:8 target=x86_64:")
conflicts("%gcc@7:", when="+cuda ^cuda@:9.1 target=x86_64:")
conflicts("%gcc@8:", when="+cuda ^cuda@:10.0.130 target=x86_64:")
conflicts("%gcc@9:", when="+cuda ^cuda@:10.2.89 target=x86_64:")
conflicts("%clang@:3.4", when="+cuda ^cuda@:7.5 target=x86_64:")
conflicts("%clang@:3.7,4:", when="+cuda ^cuda@8.0:9.0 target=x86_64:")
conflicts("%clang@:3.7,4.1:", when="+cuda ^cuda@9.1 target=x86_64:")
conflicts("%clang@:3.7,5.1:", when="+cuda ^cuda@9.2 target=x86_64:")
conflicts("%clang@:3.7,6.1:", when="+cuda ^cuda@10.0.130 target=x86_64:")
conflicts("%clang@:3.7,7.1:", when="+cuda ^cuda@10.1.105 target=x86_64:")
conflicts("%clang@:3.7,8.1:", when="+cuda ^cuda@10.1.105:10.1.243 target=x86_64:")
conflicts("%clang@:3.2,9:", when="+cuda ^cuda@10.2.89 target=x86_64:")
conflicts("%clang@:5", when="+cuda ^cuda@11.0.2: target=x86_64:")
conflicts("%clang@10:", when="+cuda ^cuda@:11.0.3 target=x86_64:")
conflicts("%clang@11:", when="+cuda ^cuda@:11.1.0 target=x86_64:")
conflicts("%gcc@10", when="%cuda@:11.4.0")
conflicts("%gcc@5:", when="%cuda@:7.5 target=x86_64:")
conflicts("%gcc@6:", when="%cuda@:8 target=x86_64:")
conflicts("%gcc@7:", when="%cuda@:9.1 target=x86_64:")
conflicts("%gcc@8:", when="%cuda@:10.0.130 target=x86_64:")
conflicts("%gcc@9:", when="%cuda@:10.2.89 target=x86_64:")
conflicts("%clang@:3.4", when="%cuda@:7.5 target=x86_64:")
conflicts("%clang@:3.7,4:", when="%cuda@8.0:9.0 target=x86_64:")
conflicts("%clang@:3.7,4.1:", when="%cuda@9.1 target=x86_64:")
conflicts("%clang@:3.7,5.1:", when="%cuda@9.2 target=x86_64:")
conflicts("%clang@:3.7,6.1:", when="%cuda@10.0.130 target=x86_64:")
conflicts("%clang@:3.7,7.1:", when="%cuda@10.1.105 target=x86_64:")
conflicts("%clang@:3.7,8.1:", when="%cuda@10.1.105:10.1.243 target=x86_64:")
conflicts("%clang@:3.2,9:", when="%cuda@10.2.89 target=x86_64:")
conflicts("%clang@:5", when="%cuda@11.0.2: target=x86_64:")
conflicts("%clang@10:", when="%cuda@:11.0.3 target=x86_64:")
conflicts("%clang@11:", when="%cuda@:11.1.0 target=x86_64:")

# x86_64 vs. ppc64le differ according to NVidia docs
# Linux ppc64le compiler conflicts from Table from the docs below:
Expand All @@ -253,50 +253,50 @@ def compute_capabilities(arch_list: Iterable[str]) -> List[str]:
# https://docs.nvidia.com/cuda/archive/8.0/cuda-installation-guide-linux/index.html

# information prior to CUDA 9 difficult to find
conflicts("%gcc@6:", when="+cuda ^cuda@:9 target=ppc64le:")
conflicts("%gcc@8:", when="+cuda ^cuda@:10.0.130 target=ppc64le:")
conflicts("%gcc@9:", when="+cuda ^cuda@:10.1.243 target=ppc64le:")
conflicts("%gcc@6:", when="%cuda@:9 target=ppc64le:")
conflicts("%gcc@8:", when="%cuda@:10.0.130 target=ppc64le:")
conflicts("%gcc@9:", when="%cuda@:10.1.243 target=ppc64le:")
# officially, CUDA 11.0.2 only supports the system GCC 8.3 on ppc64le
conflicts("%clang@4:", when="+cuda ^cuda@:9.0.176 target=ppc64le:")
conflicts("%clang@5:", when="+cuda ^cuda@:9.1 target=ppc64le:")
conflicts("%clang@6:", when="+cuda ^cuda@:9.2 target=ppc64le:")
conflicts("%clang@7:", when="+cuda ^cuda@10.0.130 target=ppc64le:")
conflicts("%clang@7.1:", when="+cuda ^cuda@:10.1.105 target=ppc64le:")
conflicts("%clang@8.1:", when="+cuda ^cuda@:10.2.89 target=ppc64le:")
conflicts("%clang@:5", when="+cuda ^cuda@11.0.2: target=ppc64le:")
conflicts("%clang@10:", when="+cuda ^cuda@:11.0.2 target=ppc64le:")
conflicts("%clang@11:", when="+cuda ^cuda@:11.1.0 target=ppc64le:")
conflicts("%clang@4:", when="%cuda@:9.0.176 target=ppc64le:")
conflicts("%clang@5:", when="%cuda@:9.1 target=ppc64le:")
conflicts("%clang@6:", when="%cuda@:9.2 target=ppc64le:")
conflicts("%clang@7:", when="%cuda@10.0.130 target=ppc64le:")
conflicts("%clang@7.1:", when="%cuda@:10.1.105 target=ppc64le:")
conflicts("%clang@8.1:", when="%cuda@:10.2.89 target=ppc64le:")
conflicts("%clang@:5", when="%cuda@11.0.2: target=ppc64le:")
conflicts("%clang@10:", when="%cuda@:11.0.2 target=ppc64le:")
conflicts("%clang@11:", when="%cuda@:11.1.0 target=ppc64le:")

# Intel is mostly relevant for x86_64 Linux, even though it also
# exists for Mac OS X. No information prior to CUDA 3.2 or Intel 11.1
conflicts("%intel@:11.0", when="+cuda ^cuda@:3.1")
conflicts("%intel@:12.0", when="+cuda ^cuda@5.5:")
conflicts("%intel@:13.0", when="+cuda ^cuda@6.0:")
conflicts("%intel@:13.2", when="+cuda ^cuda@6.5:")
conflicts("%intel@:14.9", when="+cuda ^cuda@7:")
conflicts("%intel@:11.0", when="%cuda@:3.1")
conflicts("%intel@:12.0", when="%cuda@5.5:")
conflicts("%intel@:13.0", when="%cuda@6.0:")
conflicts("%intel@:13.2", when="%cuda@6.5:")
conflicts("%intel@:14.9", when="%cuda@7:")
# Intel 15.x is compatible with CUDA 7 thru current CUDA
conflicts("%intel@16.0:", when="+cuda ^cuda@:8.0.43")
conflicts("%intel@17.0:", when="+cuda ^cuda@:8.0.60")
conflicts("%intel@18.0:", when="+cuda ^cuda@:9.9")
conflicts("%intel@19.0:", when="+cuda ^cuda@:10.0")
conflicts("%intel@19.1:", when="+cuda ^cuda@:10.1")
conflicts("%intel@19.2:", when="+cuda ^cuda@:11.1.0")
conflicts("%intel@2021:", when="+cuda ^cuda@:11.4.0")
conflicts("%intel", when="+cuda ^cuda@13.0:")
conflicts("%intel@16.0:", when="%cuda@:8.0.43")
conflicts("%intel@17.0:", when="%cuda@:8.0.60")
conflicts("%intel@18.0:", when="%cuda@:9.9")
conflicts("%intel@19.0:", when="%cuda@:10.0")
conflicts("%intel@19.1:", when="%cuda@:10.1")
conflicts("%intel@19.2:", when="%cuda@:11.1.0")
conflicts("%intel@2021:", when="%cuda@:11.4.0")
conflicts("%intel", when="%cuda@13.0:")

# ARM
# https://github.com/spack/spack/pull/39666#issuecomment-2377609263
# Might need to be expanded to other gcc versions
conflicts("%gcc@13.2.0", when="+cuda ^cuda@:12.4 target=aarch64:")
conflicts("%gcc@13.2.0", when="%cuda@:12.4 target=aarch64:")

# XL is mostly relevant for ppc64le Linux
conflicts("%xl@:12,14:", when="+cuda ^cuda@:9.1")
conflicts("%xl@:12,14:15,17:", when="+cuda ^cuda@9.2")
conflicts("%xl@:12,17:", when="+cuda ^cuda@:11.1.0")
conflicts("%xl@:12,14:", when="%cuda@:9.1")
conflicts("%xl@:12,14:15,17:", when="%cuda@9.2")
conflicts("%xl@:12,17:", when="%cuda@:11.1.0")

# PowerPC.
conflicts("target=ppc64le", when="+cuda ^cuda@12.5:")
conflicts("target=ppc64le", when="%cuda@12.5:")

# Darwin.
# TODO: add missing conflicts for %apple-clang cuda@:10
conflicts("platform=darwin", when="+cuda ^cuda@11.0.2:")
conflicts("platform=darwin", when="%cuda@11.0.2:")
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/build_systems/meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MesonPackage(PackageBase):
# when setuptools is in PYTHONPATH; it has to be in system site-packages. In a future meson
# release, the distutils requirement will be dropped, so this conflict can be relaxed.
# We have patches to make it work with meson 1.1 and above.
conflicts("^python@3.12:", when="^meson@:1.0")
conflicts("^python@3.12:", when="%meson@:1.0")

def flags_to_build_system_args(self, flags):
"""Produces a list of all command line arguments to pass the specified
Expand Down
Loading