diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml index ef85ed69c0..fcc1eb1432 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml @@ -119,7 +119,7 @@ spack: - libnrm - libquo - libunwind - - llvm +all_targets +clang +compiler-rt +libcxx +lld +lldb +llvm_dylib +flang ~cuda + - llvm +all_targets +clang +compiler-rt +libcxx +lld +lldb +build_llvm_dylib +flang ~cuda - loki - mercury - metall diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 867a539b54..cb49f7a703 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -130,7 +130,7 @@ spack: - libnrm - libquo - libunwind - - llvm +all_targets +clang +compiler-rt +libcxx +lld +lldb +llvm_dylib +flang ~cuda + - llvm +all_targets +clang +compiler-rt +libcxx +lld +lldb +build_llvm_dylib +flang ~cuda - loki - mercury - metall diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index de30ba506e..cbfddc13e9 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -123,11 +123,16 @@ class Llvm(CMakePackage, CudaPackage): "less memory to build, less stable", ) variant( - "llvm_dylib", + "build_llvm_dylib", default=False, description="Build LLVM shared library, containing all " "components in a single shared library", ) + variant( + "link_llvm_dylib", + default=False, + description="Link LLVM tools against the LLVM shared library", + ) variant( "all_targets", default=False, @@ -190,7 +195,8 @@ class Llvm(CMakePackage, CudaPackage): depends_on("gmp", when="@:3.6 +polly") depends_on("isl", when="@:3.6 +polly") - conflicts("+llvm_dylib", when="+shared_libs") + conflicts("+build_llvm_dylib", when="+shared_libs") + conflicts("+link_llvm_dylib", when="~build_llvm_dylib") conflicts("+lldb", when="~clang") conflicts("+libcxx", when="~clang") conflicts("+internal_unwind", when="~clang") @@ -552,9 +558,12 @@ def cmake_args(self): projects.append("polly") cmake_args.append(define("LINK_POLLY_INTO_TOOLS", True)) - cmake_args.append(from_variant("BUILD_SHARED_LIBS", "shared_libs")) - cmake_args.append(from_variant("LLVM_BUILD_LLVM_DYLIB", "llvm_dylib")) - cmake_args.append(from_variant("LLVM_USE_SPLIT_DWARF", "split_dwarf")) + cmake_args.extend([ + from_variant("BUILD_SHARED_LIBS", "shared_libs"), + from_variant("LLVM_BUILD_LLVM_DYLIB", "build_llvm_dylib"), + from_variant("LLVM_LINK_LLVM_DYLIB", "link_llvm_dylib"), + from_variant("LLVM_USE_SPLIT_DWARF", "split_dwarf") + ]) # By default on Linux, libc++.so is a linker script, and CMake tries to add the # CMAKE_INSTALL_RPATH to it, which fails, causing installation to fail. The