packages: minor improvements for compiler packages (#50111)

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Massimiliano Culpo 2025-04-22 09:53:12 +02:00 committed by GitHub
parent d39382bec8
commit 5e7925c502
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 37 additions and 0 deletions

View File

@ -25,6 +25,8 @@ packages:
glu: [apple-glu]
unwind: [apple-libunwind]
uuid: [apple-libuuid]
apple-clang:
buildable: false
apple-gl:
buildable: false
externals:

View File

@ -72,6 +72,8 @@ packages:
permissions:
read: world
write: user
cce:
buildable: false
cray-fftw:
buildable: false
cray-libsci:
@ -86,6 +88,8 @@ packages:
buildable: false
essl:
buildable: false
fj:
buildable: false
fujitsu-mpi:
buildable: false
fujitsu-ssl2:
@ -102,3 +106,5 @@ packages:
buildable: false
spectrum-mpi:
buildable: false
xl:
buildable: false

View File

@ -23,3 +23,5 @@ packages:
mpi:
require:
- one_of: [msmpi]
msvc:
buildable: false

View File

@ -12,6 +12,8 @@ class Cce(Package, CompilerPackage):
homepage = "https://cpe.ext.hpe.com/docs/cce/index.html"
url = "https://cpe.ext.hpe.com/docs/cce/index.html"
has_code = False
compiler_languages = ["c", "cxx", "fortran"]
c_names = ["craycc"]
cxx_names = ["crayCC"]

View File

@ -19,6 +19,8 @@ class Fj(Package, CompilerPackage):
provides("c", "cxx")
provides("fortran")
has_code = False
def install(self, spec, prefix):
raise InstallError(
"Fujitsu compilers are not installable yet, but can be "

View File

@ -31,6 +31,8 @@ class Msvc(Package, CompilerPackage):
homepage = "https://visualstudio.microsoft.com/vs/features/cplusplus/"
has_code = False
def install(self, spec, prefix):
raise InstallError(
"MSVC compilers are not installable with Spack, but can be "

View File

@ -3,6 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
import glob
import os.path
import platform
@ -640,5 +641,23 @@ def libs(self):
return find_libraries(libs, root=prefix, recursive=True)
def _cc_path(self):
candidates = glob.glob(f"{self.prefix}/**/{self.spec.version}/compilers/bin/nvc")
if not candidates:
return None
return candidates[0]
def _cxx_path(self):
candidates = glob.glob(f"{self.prefix}/**/{self.spec.version}/compilers/bin/nvc++")
if not candidates:
return None
return candidates[0]
def _fortran_path(self):
candidates = glob.glob(f"{self.prefix}/**/{self.spec.version}/compilers/bin/nvfortran")
if not candidates:
return None
return candidates[0]
# Avoid binding stub libraries by absolute path
non_bindable_shared_objects = ["stubs"]

View File

@ -14,6 +14,8 @@ class Xl(Package, CompilerPackage):
homepage = "https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/welcome.html"
has_code = False
variant("r", default=True, description="The _r version of compilers")
provides("c", "cxx")