[Openmp-commits] [openmp] 52fe16a - [Libomptarget][Obvious] Fix incorrect if-else in CMake for destination
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Thu Dec 7 06:27:59 PST 2023
Author: Joseph Huber
Date: 2023-12-07T08:27:38-06:00
New Revision: 52fe16a47e2e7a09e10830fee489eeeeef7fd130
URL: https://github.com/llvm/llvm-project/commit/52fe16a47e2e7a09e10830fee489eeeeef7fd130
DIFF: https://github.com/llvm/llvm-project/commit/52fe16a47e2e7a09e10830fee489eeeeef7fd130.diff
LOG: [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
Added:
Modified:
openmp/libomptarget/CMakeLists.txt
openmp/libomptarget/DeviceRTL/CMakeLists.txt
Removed:
################################################################################
diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt
index 115189a28ce16..e64a175be860d 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 104b65020daf2..1ce3e1e40a80a 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)
More information about the Openmp-commits
mailing list