Add patch for compiling llvm ~omp_as_runtime (#30583)

This commit is contained in:
Mikael Simberg 2022-05-12 13:49:39 +02:00 committed by GitHub
parent 3033abb5bd
commit c866a50446
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,14 @@
diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake
index 9e19e59ba17d..f92fa12d851a 100644
--- a/openmp/runtime/cmake/LibompHandleFlags.cmake
+++ b/openmp/runtime/cmake/LibompHandleFlags.cmake
@@ -144,7 +144,8 @@ function(libomp_get_libflags libflags)
endif()
set(libflags_local ${libflags_local} ${LIBOMP_LIBFLAGS})
libomp_setup_flags(libflags_local)
- set(${libflags} ${libflags_local} PARENT_SCOPE)
+ libomp_string_to_list("${libflags_local}" libflags_local_list)
+ set(${libflags} ${libflags_local_list} PARENT_SCOPE)
endfunction()
# Fortran flags

View file

@ -363,6 +363,9 @@ class Llvm(CMakePackage, CudaPackage):
# patch for missing hwloc.h include for libompd # patch for missing hwloc.h include for libompd
patch('llvm14-hwloc-ompd.patch', when='@14') patch('llvm14-hwloc-ompd.patch', when='@14')
# make libflags a list in openmp subproject when ~omp_as_runtime
patch('libomp-libflags-as-list.patch', when='@3.7:')
# The functions and attributes below implement external package # The functions and attributes below implement external package
# detection for LLVM. See: # detection for LLVM. See:
# #