llvmPackages_{15,17,18,19,git}.openmp: commonify patches

This commit is contained in:
Tristan Ross 2024-08-09 13:37:58 -07:00
parent 7b4be56d9c
commit 76f48d38f8
No known key found for this signature in database
GPG Key ID: B09C422035669AF8
9 changed files with 18 additions and 69 deletions

View File

@ -1,12 +0,0 @@
diff --git a/cmake/OpenMPTesting.cmake b/cmake/OpenMPTesting.cmake
--- a/cmake/OpenMPTesting.cmake
+++ b/cmake/OpenMPTesting.cmake
@@ -185,7 +185,7 @@ function(add_openmp_testsuite target comment)
if (${OPENMP_STANDALONE_BUILD})
set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
add_custom_target(${target}
- COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
+ COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
COMMENT ${comment}
DEPENDS ${ARG_DEPENDS}
USES_TERMINAL

View File

@ -1,17 +0,0 @@
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
index 630947abec7e..9f032dc7bd3f 100644
--- a/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
@@ -27,10 +27,10 @@ endif()
if (LLVM_DIR)
# Builds that use pre-installed LLVM have LLVM_DIR set.
# A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT PACKAGER_TOOL))
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
return()

View File

@ -1,17 +0,0 @@
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
index 630947abec7e..9f032dc7bd3f 100644
--- a/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
@@ -27,10 +27,10 @@ endif()
if (LLVM_DIR)
# Builds that use pre-installed LLVM have LLVM_DIR set.
# A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT PACKAGER_TOOL))
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
return()

View File

@ -122,7 +122,11 @@ let
../13/${p}
else if
lib.versionAtLeast release_version "16"
&& (p == "lld/add-table-base.patch" || p == "compiler-rt/normalize-var.patch")
&& (
p == "lld/add-table-base.patch"
|| p == "compiler-rt/normalize-var.patch"
|| p == "openmp/run-lit-directly.patch"
)
then
../16/${p}
else if
@ -134,18 +138,26 @@ let
../12/${p}
else if
lib.versionAtLeast release_version "14"
&& lib.versionOlder release_version "18"
&& p == "llvm/gnu-install-dirs-polly.patch"
&& (
(lib.versionOlder release_version "18" && p == "llvm/gnu-install-dirs-polly.patch")
|| (lib.versionOlder release_version "16" && p == "openmp/run-lit-directly.patch")
)
then
../14/${p}
else if
lib.versionAtLeast release_version "16"
&& lib.versionOlder release_version "18"
&& p == "llvm/lit-shell-script-runner-set-dyld-library-path.patch"
&& (
(
lib.versionOlder release_version "18"
&& p == "llvm/lit-shell-script-runner-set-dyld-library-path.patch"
)
|| p == "openmp/run-lit-directly.patch"
)
then
../16/${p}
else if
lib.versionAtLeast release_version "17" && p == "llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch"
lib.versionAtLeast release_version "17"
&& (p == "llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch" || p == "openmp/fix-find-tool.patch")
then
../17/${p}
else if

View File

@ -1,17 +0,0 @@
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
index 630947abec7e..9f032dc7bd3f 100644
--- a/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
@@ -27,10 +27,10 @@ endif()
if (LLVM_DIR)
# Builds that use pre-installed LLVM have LLVM_DIR set.
# A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT PACKAGER_TOOL))
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
return()