mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 08:36:41 +01:00
openmp: drop fix-find-tool patch, set *_TOOL vars directly
This commit is contained in:
parent
7151381aab
commit
4f3116f754
2 changed files with 7 additions and 37 deletions
|
@ -26,13 +26,12 @@ stdenv.mkDerivation rec {
|
|||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
./fix-find-tool.patch
|
||||
./run-lit-directly.patch
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [ cmake perl pkg-config clang-unwrapped lit ];
|
||||
nativeBuildInputs = [ cmake perl pkg-config lit ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
doCheck = true;
|
||||
|
@ -42,6 +41,12 @@ stdenv.mkDerivation rec {
|
|||
patchShebangs ../tools/archer/tests/deflake.bash
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
|
||||
"-DOPT_TOOL=${llvm}/bin/opt"
|
||||
"-DLINK_TOOL=${llvm}/bin/llvm-link"
|
||||
];
|
||||
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
description = "Support for the OpenMP language";
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
|
||||
index d8b9e40802b8..3a8d76ab370f 100644
|
||||
--- a/libomptarget/DeviceRTL/CMakeLists.txt
|
||||
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
|
||||
@@ -25,10 +25,10 @@ endif()
|
||||
|
||||
if (LLVM_DIR)
|
||||
# Builds that use pre-installed LLVM have LLVM_DIR set.
|
||||
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
|
||||
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
|
||||
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)
|
||||
+ REQUIRED)
|
||||
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
|
||||
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL))
|
||||
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}")
|
||||
return()
|
||||
diff --git a/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
|
||||
index 406013073024..7402ab1ea292 100644
|
||||
--- a/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
|
||||
+++ b/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
|
||||
@@ -38,9 +38,9 @@ endif()
|
||||
|
||||
if (LLVM_DIR)
|
||||
# Builds that use pre-installed LLVM have LLVM_DIR set.
|
||||
- find_program(CLANG_TOOL clang 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(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
|
||||
+ find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
|
||||
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
|
||||
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL))
|
||||
libomptarget_say("Not building AMDGCN device RTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}")
|
||||
return()
|
Loading…
Reference in a new issue