From 440420db5e46f0fe0118f3e27b8b7e3278935515 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 26 Jan 2023 14:28:19 +0100 Subject: [PATCH] rebase of the patches --- debian/patches/openmp-fix-runtimes-build.diff | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/debian/patches/openmp-fix-runtimes-build.diff b/debian/patches/openmp-fix-runtimes-build.diff index a80cd5da..ccd61cb2 100644 --- a/debian/patches/openmp-fix-runtimes-build.diff +++ b/debian/patches/openmp-fix-runtimes-build.diff @@ -1,11 +1,11 @@ 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 can depend on them -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/llvm/runtimes/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/llvm/runtimes/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/llvm/runtimes/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/llvm/runtimes/CMakeLists.txt -@@ -235,6 +235,7 @@ function(runtime_default_target) +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/llvm/runtimes/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/llvm/runtimes/CMakeLists.txt +@@ -233,6 +233,7 @@ function(runtime_default_target) -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED} -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default} -DLLVM_BUILD_TOOLS=${LLVM_BUILD_TOOLS} @@ -13,7 +13,7 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/llvm/runtimes/CM -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_CXX_COMPILER_WORKS=ON -DCMAKE_ASM_COMPILER_WORKS=ON -@@ -465,7 +466,7 @@ if(runtimes) +@@ -480,7 +481,7 @@ if(runtimes) # build directory cannot find the C++ headers in certain configurations. # I need to build a mechanism for runtime projects to provide CMake code # that executes at LLVM configuration time to handle this case. @@ -22,11 +22,11 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/llvm/runtimes/CM # 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 add_dependencies(clang-bootstrap-deps runtimes) -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/openmp/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/CMakeLists.txt -@@ -83,6 +83,28 @@ else() +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/openmp/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/CMakeLists.txt +@@ -91,6 +91,28 @@ else() set(LIBOMP_HEADERS_INSTALL_PATH "${OPENMP_INSTALL_LIBDIR}/clang/${CLANG_VERSION}/include") endif() @@ -55,10 +55,10 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/CMakeList # Build host runtime library, after LIBOMPTARGET variables are set since they are needed # to enable time profiling support in the OpenMP runtime. add_subdirectory(runtime) -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptarget/plugins/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/libomptarget/plugins/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/openmp/libomptarget/plugins/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptarget/plugins/CMakeLists.txt +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/openmp/libomptarget/plugins/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/libomptarget/plugins/CMakeLists.txt @@ -48,6 +48,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tma NO_INSTALL_RPATH ) @@ -68,24 +68,24 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptar # Install plugin under the lib destination folder. install(TARGETS "omptarget.rtl.${tmachine_libname}" LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}") -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptarget/plugins/cuda/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/libomptarget/plugins/cuda/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/openmp/libomptarget/plugins/cuda/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptarget/plugins/cuda/CMakeLists.txt -@@ -84,6 +84,8 @@ else() - endif() - add_dependencies(omptarget.rtl.cuda omptarget.devicertl.nvptx) +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/openmp/libomptarget/plugins/cuda/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/libomptarget/plugins/cuda/CMakeLists.txt +@@ -56,6 +56,8 @@ add_dependencies(omptarget.rtl.cuda ompt + target_compile_definitions(omptarget.rtl.cuda PRIVATE TARGET_NAME="CUDA") + target_include_directories(omptarget.rtl.cuda PRIVATE ${LIBOMPTARGET_INCLUDE_DIR}) +add_runtimes_build_depends_if_needed(omptarget.rtl.cuda) + # Install plugin under the lib destination folder. install(TARGETS omptarget.rtl.cuda LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}") set_target_properties(omptarget.rtl.cuda PROPERTIES -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptarget/src/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/libomptarget/src/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/openmp/libomptarget/src/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptarget/src/CMakeLists.txt -@@ -34,7 +34,9 @@ add_llvm_library(omptarget +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/openmp/libomptarget/src/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/libomptarget/src/CMakeLists.txt +@@ -35,7 +35,9 @@ add_llvm_library(omptarget PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports" NO_INSTALL_RPATH @@ -96,10 +96,10 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/libomptar target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR}) # libomptarget.so needs to be aware of where the plugins live as they -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/runtime/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/runtime/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/openmp/runtime/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/runtime/CMakeLists.txt +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/openmp/runtime/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/runtime/CMakeLists.txt @@ -292,6 +292,10 @@ if(LIBOMP_STATS) set(LIBOMP_USE_STDCPPLIB TRUE) endif() @@ -111,11 +111,11 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/runtime/C # Shared library can be switched to a static library set(LIBOMP_ENABLE_SHARED TRUE CACHE BOOL "Shared library instead of static library?") -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/runtime/src/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/runtime/src/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/openmp/runtime/src/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/runtime/src/CMakeLists.txt -@@ -135,6 +135,7 @@ endif() +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/openmp/runtime/src/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/runtime/src/CMakeLists.txt +@@ -140,6 +140,7 @@ set_source_files_properties(${LIBOMP_GNU if(NOT ${LIBOMP_USE_STDCPPLIB}) set(LIBOMP_LINKER_LANGUAGE C) set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES) @@ -123,7 +123,7 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/runtime/s else() set(LIBOMP_LINKER_LANGUAGE CXX) endif() -@@ -196,6 +197,8 @@ else() +@@ -201,6 +202,8 @@ else() ) endif() @@ -132,10 +132,10 @@ Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/runtime/s # Get the library's location within the build tree for the unit tester if(NOT WIN32) get_target_property(LIBOMP_LIBRARY_DIR omp LIBRARY_OUTPUT_DIRECTORY) -Index: llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/tools/archer/CMakeLists.txt +Index: llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/tools/archer/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f.orig/openmp/tools/archer/CMakeLists.txt -+++ llvm-toolchain-snapshot_16~++20220920091612+a7d2409bac7f/openmp/tools/archer/CMakeLists.txt +--- llvm-toolchain-snapshot_17~++20230126021740+85395af27241.orig/openmp/tools/archer/CMakeLists.txt ++++ llvm-toolchain-snapshot_17~++20230126021740+85395af27241/openmp/tools/archer/CMakeLists.txt @@ -14,6 +14,9 @@ if(LIBOMP_OMPT_SUPPORT) add_library(archer SHARED ompt-tsan.cpp) add_library(archer_static STATIC ompt-tsan.cpp)