Skip to content

Commit 52fe16a

Browse files
committed
[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 #74079
1 parent 9406d2a commit 52fe16a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openmp/libomptarget/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBOMPTARGET_LIBRARY_DIR})
2424
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBOMPTARGET_LIBRARY_DIR})
2525
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBOMPTARGET_LIBRARY_DIR})
2626

27-
if(LLVM_LIBRARY_OUTPUT_INTDIR)
27+
if(NOT LLVM_LIBRARY_OUTPUT_INTDIR)
2828
set(LIBOMPTARGET_INTDIR ${LIBOMPTARGET_LIBRARY_DIR})
2929
else()
3030
set(LIBOMPTARGET_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})

openmp/libomptarget/DeviceRTL/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ endforeach()
302302
# Archive all the object files generated above into a static library
303303
add_library(omptarget.devicertl STATIC)
304304
set_target_properties(omptarget.devicertl PROPERTIES
305-
ARCHIVE_OUTPUT_DIRECTORY ${LIBOMPTARGET_LLVM_LIBRARY_INTDIR}
305+
ARCHIVE_OUTPUT_DIRECTORY "${LIBOMPTARGET_LLVM_LIBRARY_INTDIR}"
306306
LINKER_LANGUAGE CXX
307307
)
308308
target_link_libraries(omptarget.devicertl PRIVATE omptarget.devicertl.all_objs)

0 commit comments

Comments
 (0)