summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMartin Aumüller <aumuell@reserv.at>2023-07-11 18:44:18 +0200
committerGitHub <noreply@github.com>2023-07-11 09:44:18 -0700
commit2e695fa03fd9a5dd0614d678f8c78361b0a06f19 (patch)
treed97872e3fbf3d7d99fe8b2cd625a38c8bc8e17f4 /var
parent5fc949f252104336d3664966f02832c21bc857e7 (diff)
downloadspack-2e695fa03fd9a5dd0614d678f8c78361b0a06f19.tar.gz
spack-2e695fa03fd9a5dd0614d678f8c78361b0a06f19.tar.bz2
spack-2e695fa03fd9a5dd0614d678f8c78361b0a06f19.tar.xz
spack-2e695fa03fd9a5dd0614d678f8c78361b0a06f19.zip
ispc: on ARM, build with ARM targets enabled, and updates (#38080)
* llvm: fix build with libcxx=none * ispc: checksum 1.20.0 * ispc: ensure that it does not crash immediately this would happen if linked to the wrong libc++ * ispc: fix build on macos find ncurses instead of curses and link against tinfo in order to avoid unresolved references to _del_curterm, _set_curterm, _setupterm, and _tigetnum * ispc: enable arm targets, if building on arm * ispc: remove double cmake argument I forgot to remove the constant -DARM_ENABLED=FALSE when adding -DARM_ENABLED with a value depending on target architecture * ispc: fix linux build since 1.20, linux build uses TBB as default tasking system and thus needs to depend on it * ispc: try to fix link error on linux link against both curses (as before) and tinfo (added because of macos) * ispc: update for recent llvm changes libcxx=none instead of ~libcxx
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ispc/package.py19
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py4
2 files changed, 22 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/ispc/package.py b/var/spack/repos/builtin/packages/ispc/package.py
index 68b7ecf382..1c8263d3a9 100644
--- a/var/spack/repos/builtin/packages/ispc/package.py
+++ b/var/spack/repos/builtin/packages/ispc/package.py
@@ -25,6 +25,7 @@ class Ispc(CMakePackage):
executables = ["^ispc$"]
version("main", branch="main")
+ version("1.20.0", sha256="8bd30ded7f96859451ead1cecf6f58ac8e937288fe0e5b98c56f6eba4be370b4")
version("1.19.0", sha256="c1aeae4bdfb28004a6949394ea1b3daa3fdf12f646e17fcc0614861077dc8b6a")
version("1.18.1", sha256="fee76d42fc0129f81489b7c2b9143e22a44c281940693c1c13cf1e3dd2ab207f")
version("1.18.0", sha256="ecf1fc6ad5e39242e555b8e0ac539489939a9e475722eaa9da5caa4651cecf05")
@@ -41,7 +42,9 @@ class Ispc(CMakePackage):
depends_on("flex", type="build")
depends_on("ncurses", type="link")
depends_on("zlib", type="link")
+ depends_on("tbb", type="link", when="platform=linux @1.20:")
depends_on("llvm+clang")
+ depends_on("llvm libcxx=none", when="platform=darwin")
depends_on("llvm@13:15", when="@1.19:")
depends_on("llvm@11.0:14.0", when="@1.18")
depends_on("llvm@11:14", when="@1.17")
@@ -49,6 +52,8 @@ class Ispc(CMakePackage):
depends_on("llvm@11:", when="@1.16")
depends_on("llvm@10:11", when="@1.15.0:1.15")
depends_on("llvm@10.0:10", when="@1.13:1.14")
+ depends_on("llvm targets=arm,aarch64", when="target=arm:")
+ depends_on("llvm targets=arm,aarch64", when="target=aarch64:")
patch(
"don-t-assume-that-ncurses-zlib-are-system-libraries.patch",
@@ -65,6 +70,7 @@ class Ispc(CMakePackage):
def setup_build_environment(self, env):
if self.spec.satisfies("@1.18.0:"):
env.append_flags("LDFLAGS", "-lcurses")
+ env.append_flags("LDFLAGS", "-ltinfo")
env.append_flags("LDFLAGS", "-lz")
def patch(self):
@@ -76,14 +82,25 @@ class Ispc(CMakePackage):
filter_file("bit 32 64", "bit 64", "cmake/GenerateBuiltins.cmake")
def cmake_args(self):
+ spec = self.spec
args = []
- args.append("-DARM_ENABLED=FALSE")
args.append("-DISPC_NO_DUMPS=ON") # otherwise, LLVM needs patching
+ args.append("-DCURSES_NEED_NCURSES=TRUE")
args.append("-DISPC_INCLUDE_EXAMPLES=OFF")
args.append("-DISPC_INCLUDE_TESTS=OFF")
args.append("-DISPC_INCLUDE_UTILS=OFF")
+ if spec.satisfies("target=x86_64:") or spec.satisfies("target=x86:"):
+ args.append("-DARM_ENABLED=OFF")
+ elif spec.satisfies("target=aarch64:"):
+ args.append("-DARM_ENABLED=ON")
return args
+ @run_after("install")
+ def check_install(self):
+ with working_dir(self.stage.source_path):
+ ispc = Executable(join_path(self.prefix, "bin", "ispc"))
+ ispc("--version")
+
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("--version", output=str, error=str)
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 9b537df57a..120ce06808 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -885,6 +885,10 @@ class Llvm(CMakePackage, CudaPackage):
if self.spec.satisfies("~code_signing platform=darwin"):
cmake_args.append(define("LLDB_USE_SYSTEM_DEBUGSERVER", True))
+ # LLDB test suite requires libc++
+ if "libcxx=none" in spec:
+ cmake_args.append(define("LLDB_INCLUDE_TESTS", False))
+
# Enable building with CLT [and not require full Xcode]
# https://github.com/llvm/llvm-project/issues/57037
if self.spec.satisfies("@15.0.0: platform=darwin"):