summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2020-11-16 14:10:20 -0800
committerGitHub <noreply@github.com>2020-11-16 14:10:20 -0800
commit81a7ae2c27fabeaeecf928337d7b990e069b5e2e (patch)
tree558859739f46a71aa7b9c39611c23123a47686c2
parent42008e532f28c41d8e134052e1a109c65a8440f9 (diff)
downloadspack-81a7ae2c27fabeaeecf928337d7b990e069b5e2e.tar.gz
spack-81a7ae2c27fabeaeecf928337d7b990e069b5e2e.tar.bz2
spack-81a7ae2c27fabeaeecf928337d7b990e069b5e2e.tar.xz
spack-81a7ae2c27fabeaeecf928337d7b990e069b5e2e.zip
llvm: add variant: llvm_dylib (LLVM_BUILD_LLVM_DYLIB:Bool) (#19701)
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 3d4bfe8d53..9e6bc0e2a6 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -108,6 +108,12 @@ class Llvm(CMakePackage, CudaPackage):
"less memory to build, less stable",
)
variant(
+ "llvm_dylib",
+ default=False,
+ description="Build LLVM shared library, containing all "
+ "components in a single shared library",
+ )
+ variant(
"all_targets",
default=False,
description="Build all supported targets, default targets "
@@ -161,6 +167,7 @@ class Llvm(CMakePackage, CudaPackage):
depends_on("gmp", when="@:3.6.999 +polly")
depends_on("isl", when="@:3.6.999 +polly")
+ conflicts("+llvm_dylib", when="+shared_libs")
conflicts("+lldb", when="~clang")
conflicts("+libcxx", when="~clang")
conflicts("+internal_unwind", when="~clang")
@@ -430,6 +437,8 @@ class Llvm(CMakePackage, CudaPackage):
if "+shared_libs" in spec:
cmake_args.append("-DBUILD_SHARED_LIBS:Bool=ON")
+ if "+llvm_dylib" in spec:
+ cmake_args.append("-DLLVM_BUILD_LLVM_DYLIB:Bool=ON")
if "+omp_debug" in spec:
cmake_args.append("-DLIBOMPTARGET_ENABLE_DEBUG:Bool=ON")