mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-08-07 16:08:27 +00:00
rebase of the patch
This commit is contained in:
parent
248780e81f
commit
8d4c8b4bb3
70
debian/patches/openmp-fix-runtimes-build.diff
vendored
70
debian/patches/openmp-fix-runtimes-build.diff
vendored
@ -2,10 +2,10 @@ include required runtimes as dependencies to openmp targets to make sure
|
|||||||
they are built first when included as part of a runtimes build since openmp
|
they are built first when included as part of a runtimes build since openmp
|
||||||
can depend on them
|
can depend on them
|
||||||
<<<<<<< Updated upstream
|
<<<<<<< Updated upstream
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/llvm/runtimes/CMakeLists.txt
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/llvm/runtimes/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/llvm/runtimes/CMakeLists.txt
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/llvm/runtimes/CMakeLists.txt
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/llvm/runtimes/CMakeLists.txt
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/llvm/runtimes/CMakeLists.txt
|
||||||
@@ -247,6 +247,7 @@ function(runtime_default_target)
|
@@ -247,6 +247,7 @@ function(runtime_default_target)
|
||||||
-DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
|
-DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
|
||||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR}
|
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR}
|
||||||
@ -14,7 +14,7 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/llvm/runtimes/CM
|
|||||||
-DCMAKE_C_COMPILER_WORKS=ON
|
-DCMAKE_C_COMPILER_WORKS=ON
|
||||||
-DCMAKE_CXX_COMPILER_WORKS=ON
|
-DCMAKE_CXX_COMPILER_WORKS=ON
|
||||||
-DCMAKE_ASM_COMPILER_WORKS=ON
|
-DCMAKE_ASM_COMPILER_WORKS=ON
|
||||||
@@ -522,7 +523,7 @@ if(runtimes)
|
@@ -555,7 +556,7 @@ if(runtimes)
|
||||||
# build directory cannot find the C++ headers in certain configurations.
|
# build directory cannot find the C++ headers in certain configurations.
|
||||||
# I need to build a mechanism for runtime projects to provide CMake code
|
# I need to build a mechanism for runtime projects to provide CMake code
|
||||||
# that executes at LLVM configuration time to handle this case.
|
# that executes at LLVM configuration time to handle this case.
|
||||||
@ -23,10 +23,10 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/llvm/runtimes/CM
|
|||||||
# We need to add the runtimes as a dependency because compiler-rt can be
|
# We need to add the runtimes as a dependency because compiler-rt can be
|
||||||
# built as part of runtimes and we need the profile runtime for PGO
|
# built as part of runtimes and we need the profile runtime for PGO
|
||||||
add_dependencies(clang-bootstrap-deps runtimes)
|
add_dependencies(clang-bootstrap-deps runtimes)
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/CMakeLists.txt
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/openmp/CMakeLists.txt
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/openmp/CMakeLists.txt
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/CMakeLists.txt
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/CMakeLists.txt
|
||||||
@@ -119,6 +119,28 @@ else()
|
@@ -119,6 +119,28 @@ else()
|
||||||
get_clang_resource_dir(LIBOMP_HEADERS_INSTALL_PATH SUBDIR include)
|
get_clang_resource_dir(LIBOMP_HEADERS_INSTALL_PATH SUBDIR include)
|
||||||
endif()
|
endif()
|
||||||
@ -56,23 +56,10 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/CMakeList
|
|||||||
# Build host runtime library, after LIBOMPTARGET variables are set since they are needed
|
# Build host runtime library, after LIBOMPTARGET variables are set since they are needed
|
||||||
# to enable time profiling support in the OpenMP runtime.
|
# to enable time profiling support in the OpenMP runtime.
|
||||||
add_subdirectory(runtime)
|
add_subdirectory(runtime)
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptarget/plugins-nextgen/CMakeLists.txt
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/openmp/libomptarget/plugins-nextgen/CMakeLists.txt
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptarget/plugins-nextgen/CMakeLists.txt
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
|
||||||
@@ -75,6 +75,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tma
|
|
||||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../exports")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
+ add_runtimes_build_depends_if_needed("omptarget.rtl.${tmachine_libname}")
|
|
||||||
+
|
|
||||||
# Install plugin under the lib destination folder.
|
|
||||||
install(TARGETS "omptarget.rtl.${tmachine_libname}"
|
|
||||||
LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}")
|
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
|
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
|
|
||||||
@@ -81,6 +81,8 @@ else()
|
@@ -81,6 +81,8 @@ else()
|
||||||
" Use 'LIBOMPTARGET_FORCE_NVIDIA_TESTS' to override.")
|
" Use 'LIBOMPTARGET_FORCE_NVIDIA_TESTS' to override.")
|
||||||
endif()
|
endif()
|
||||||
@ -82,10 +69,10 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptar
|
|||||||
# Install plugin under the lib destination folder.
|
# Install plugin under the lib destination folder.
|
||||||
install(TARGETS omptarget.rtl.cuda LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}")
|
install(TARGETS omptarget.rtl.cuda LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}")
|
||||||
set_target_properties(omptarget.rtl.cuda PROPERTIES
|
set_target_properties(omptarget.rtl.cuda PROPERTIES
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptarget/src/CMakeLists.txt
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/libomptarget/src/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/openmp/libomptarget/src/CMakeLists.txt
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/openmp/libomptarget/src/CMakeLists.txt
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptarget/src/CMakeLists.txt
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/libomptarget/src/CMakeLists.txt
|
||||||
@@ -43,6 +43,9 @@ add_llvm_library(omptarget
|
@@ -43,6 +43,9 @@ add_llvm_library(omptarget
|
||||||
NO_INSTALL_RPATH
|
NO_INSTALL_RPATH
|
||||||
BUILDTREE_ONLY
|
BUILDTREE_ONLY
|
||||||
@ -96,10 +83,10 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/libomptar
|
|||||||
target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR})
|
target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR})
|
||||||
|
|
||||||
if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
|
if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/runtime/CMakeLists.txt
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/runtime/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/openmp/runtime/CMakeLists.txt
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/openmp/runtime/CMakeLists.txt
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/runtime/CMakeLists.txt
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/runtime/CMakeLists.txt
|
||||||
@@ -318,6 +318,10 @@ if(LIBOMP_STATS)
|
@@ -318,6 +318,10 @@ if(LIBOMP_STATS)
|
||||||
set(LIBOMP_USE_STDCPPLIB TRUE)
|
set(LIBOMP_USE_STDCPPLIB TRUE)
|
||||||
endif()
|
endif()
|
||||||
@ -111,10 +98,10 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/runtime/C
|
|||||||
# Shared library can be switched to a static library
|
# Shared library can be switched to a static library
|
||||||
set(LIBOMP_ENABLE_SHARED TRUE CACHE BOOL
|
set(LIBOMP_ENABLE_SHARED TRUE CACHE BOOL
|
||||||
"Shared library instead of static library?")
|
"Shared library instead of static library?")
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/runtime/src/CMakeLists.txt
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/runtime/src/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/openmp/runtime/src/CMakeLists.txt
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/openmp/runtime/src/CMakeLists.txt
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/runtime/src/CMakeLists.txt
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/runtime/src/CMakeLists.txt
|
||||||
@@ -144,6 +144,7 @@ set_source_files_properties(${LIBOMP_ASM
|
@@ -144,6 +144,7 @@ set_source_files_properties(${LIBOMP_ASM
|
||||||
if(NOT ${LIBOMP_USE_STDCPPLIB})
|
if(NOT ${LIBOMP_USE_STDCPPLIB})
|
||||||
set(LIBOMP_LINKER_LANGUAGE C)
|
set(LIBOMP_LINKER_LANGUAGE C)
|
||||||
@ -132,10 +119,10 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/runtime/s
|
|||||||
# Get the library's location within the build tree for the unit tester
|
# Get the library's location within the build tree for the unit tester
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
get_target_property(LIBOMP_LIBRARY_DIR omp LIBRARY_OUTPUT_DIRECTORY)
|
get_target_property(LIBOMP_LIBRARY_DIR omp LIBRARY_OUTPUT_DIRECTORY)
|
||||||
Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/tools/archer/CMakeLists.txt
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/tools/archer/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9.orig/openmp/tools/archer/CMakeLists.txt
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/openmp/tools/archer/CMakeLists.txt
|
||||||
+++ llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/tools/archer/CMakeLists.txt
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/tools/archer/CMakeLists.txt
|
||||||
@@ -15,6 +15,9 @@ if(LIBOMP_OMPT_SUPPORT AND LIBOMP_ARCHER
|
@@ -15,6 +15,9 @@ if(LIBOMP_OMPT_SUPPORT AND LIBOMP_ARCHER
|
||||||
target_link_libraries(archer ${CMAKE_DL_LIBS})
|
target_link_libraries(archer ${CMAKE_DL_LIBS})
|
||||||
add_library(archer_static STATIC ompt-tsan.cpp)
|
add_library(archer_static STATIC ompt-tsan.cpp)
|
||||||
@ -146,3 +133,16 @@ Index: llvm-toolchain-snapshot_19~++20240302114133+c4f59937cae9/openmp/tools/arc
|
|||||||
install(TARGETS archer archer_static
|
install(TARGETS archer archer_static
|
||||||
LIBRARY DESTINATION ${OPENMP_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${OPENMP_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${OPENMP_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${OPENMP_INSTALL_LIBDIR})
|
||||||
|
Index: llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/libomptarget/plugins-nextgen/host/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649.orig/openmp/libomptarget/plugins-nextgen/host/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_19~++20240321103016+ee5e027cc649/openmp/libomptarget/plugins-nextgen/host/CMakeLists.txt
|
||||||
|
@@ -51,6 +51,8 @@ if(LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
|
||||||
|
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../exports")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+add_runtimes_build_depends_if_needed("omptarget.rtl.${machine}")
|
||||||
|
+
|
||||||
|
# Install plugin under the lib destination folder.
|
||||||
|
install(TARGETS omptarget.rtl.${machine}
|
||||||
|
LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}")
|
||||||
|
Loading…
Reference in New Issue
Block a user