Skip to content

Commit 6d032c4

Browse files
authored
[OpenMP] Fix incorrect CUDA bc path after library change (#157547)
1 parent 8ec4d87 commit 6d032c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

offload/test/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ else: # Unices
169169
if config.cuda_libdir:
170170
config.test_flags += " -Wl,-rpath," + config.cuda_libdir
171171
if config.libomptarget_current_target.startswith('nvptx'):
172-
config.test_flags_clang += " --libomptarget-nvptx-bc-path=" + config.llvm_library_intdir
172+
config.test_flags_clang += " --libomptarget-nvptx-bc-path=" + config.llvm_library_intdir + "/nvptx64-nvidia-cuda"
173173
if config.libomptarget_current_target.endswith('-LTO'):
174174
config.test_flags += " -foffload-lto"
175175
if config.libomptarget_current_target.endswith('-JIT-LTO') and evaluate_bool_env(

openmp/device/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ endif()
5757
# Trick to combine these into a bitcode file via the linker's LTO pass.
5858
add_executable(libompdevice ${src_files})
5959
set_target_properties(libompdevice PROPERTIES
60-
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
60+
RUNTIME_OUTPUT_DIRECTORY "${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}"
6161
LINKER_LANGUAGE CXX
6262
BUILD_RPATH ""
6363
INSTALL_RPATH ""
@@ -85,7 +85,7 @@ install(TARGETS libompdevice
8585

8686
add_library(ompdevice.all_objs OBJECT IMPORTED)
8787
set_property(TARGET ompdevice.all_objs APPEND PROPERTY IMPORTED_OBJECTS
88-
${CMAKE_CURRENT_BINARY_DIR}/libomptarget-${target_name}.bc)
88+
${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/libomptarget-${target_name}.bc)
8989

9090
# Archive all the object files generated above into a static library
9191
add_library(ompdevice STATIC)

0 commit comments

Comments
 (0)