summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Luszczek <luszczek@icl.utk.edu>2021-11-22 16:41:43 -0500
committerGitHub <noreply@github.com>2021-11-22 13:41:43 -0800
commite90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 (patch)
tree8d07b84989ef6992288aad211befdc23a896187d
parentabec10fcd58abc680b887d1d55d386990073564a (diff)
downloadspack-e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1.tar.gz
spack-e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1.tar.bz2
spack-e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1.tar.xz
spack-e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1.zip
Intel packages: add support for LLVM OpenMP (#26517)
-rw-r--r--lib/spack/spack/build_systems/intel.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py
index c087596087..9968bc2ec6 100644
--- a/lib/spack/spack/build_systems/intel.py
+++ b/lib/spack/spack/build_systems/intel.py
@@ -690,6 +690,12 @@ class IntelPackage(PackageBase):
'--print-file-name', 'libgomp.%s' % dso_suffix, output=str)
omp_libs = LibraryList(omp_lib_path.strip())
+ elif '%clang' in self.spec:
+ clang = Executable(self.compiler.cc)
+ omp_lib_path = clang(
+ '--print-file-name', 'libomp.%s' % dso_suffix, output=str)
+ omp_libs = LibraryList(omp_lib_path.strip())
+
if len(omp_libs) < 1:
raise_lib_error('Cannot locate OpenMP libraries:', omp_libnames)
@@ -772,7 +778,7 @@ class IntelPackage(PackageBase):
if self.spec.satisfies('threads=openmp'):
if '%intel' in self.spec:
mkl_threading = 'libmkl_intel_thread'
- elif '%gcc' in self.spec:
+ elif '%gcc' in self.spec or '%clang' in self.spec:
mkl_threading = 'libmkl_gnu_thread'
threading_engine_libs = self.openmp_libs
elif self.spec.satisfies('threads=tbb'):