aboutsummaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2023-12-07 08:21:41 -0600
committerJoseph Huber <huberjn@outlook.com>2023-12-07 08:27:38 -0600
commit52fe16a47e2e7a09e10830fee489eeeeef7fd130 (patch)
tree0b11bac6b9d6a3bdc96859065aa141c410b8600e /openmp
parent9406d2a345e827146b7bf369542d8778982bfc6c (diff)
downloadllvm-52fe16a47e2e7a09e10830fee489eeeeef7fd130.zip
llvm-52fe16a47e2e7a09e10830fee489eeeeef7fd130.tar.gz
llvm-52fe16a47e2e7a09e10830fee489eeeeef7fd130.tar.bz2
[Libomptarget][Obvious] Fix incorrect if-else in CMake for destination
Summary: This was added in a previous patch to update how we export the static library used for OpenMP offloading. By mistake this if-else was using the output incorrectly. Fixes https://github.com/llvm/llvm-project/issues/74079
Diffstat (limited to 'openmp')
-rw-r--r--openmp/libomptarget/CMakeLists.txt2
-rw-r--r--openmp/libomptarget/DeviceRTL/CMakeLists.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt
index 115189a..e64a175b 100644
--- a/openmp/libomptarget/CMakeLists.txt
+++ b/openmp/libomptarget/CMakeLists.txt
@@ -24,7 +24,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBOMPTARGET_LIBRARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBOMPTARGET_LIBRARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBOMPTARGET_LIBRARY_DIR})
-if(LLVM_LIBRARY_OUTPUT_INTDIR)
+if(NOT LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBOMPTARGET_INTDIR ${LIBOMPTARGET_LIBRARY_DIR})
else()
set(LIBOMPTARGET_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
index 104b650..1ce3e1e 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -302,7 +302,7 @@ endforeach()
# Archive all the object files generated above into a static library
add_library(omptarget.devicertl STATIC)
set_target_properties(omptarget.devicertl PROPERTIES
- ARCHIVE_OUTPUT_DIRECTORY ${LIBOMPTARGET_LLVM_LIBRARY_INTDIR}
+ ARCHIVE_OUTPUT_DIRECTORY "${LIBOMPTARGET_LLVM_LIBRARY_INTDIR}"
LINKER_LANGUAGE CXX
)
target_link_libraries(omptarget.devicertl PRIVATE omptarget.devicertl.all_objs)