From b85ddc2c351c40bc5fbd1b487f532e40b8455dcd Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 8 Sep 2025 15:40:06 -0500 Subject: [PATCH 1/3] [OpenMP] Fix incorrect CUDA bc path after library change --- offload/test/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offload/test/lit.cfg b/offload/test/lit.cfg index f3e8e9a66685e..a41bcb9c0d064 100644 --- a/offload/test/lit.cfg +++ b/offload/test/lit.cfg @@ -169,7 +169,7 @@ else: # Unices if config.cuda_libdir: config.test_flags += " -Wl,-rpath," + config.cuda_libdir if config.libomptarget_current_target.startswith('nvptx'): - config.test_flags_clang += " --libomptarget-nvptx-bc-path=" + config.llvm_library_intdir + config.test_flags_clang += " --libomptarget-nvptx-bc-path=" + config.llvm_library_intdir + "/nvptx64-nvidia-cuda" if config.libomptarget_current_target.endswith('-LTO'): config.test_flags += " -foffload-lto" if config.libomptarget_current_target.endswith('-JIT-LTO') and evaluate_bool_env( From 77ed643bf543cea4b53023cbfc93e4571ef808cd Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 8 Sep 2025 16:03:42 -0500 Subject: [PATCH 2/3] Fix intermediate output --- openmp/device/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmp/device/CMakeLists.txt b/openmp/device/CMakeLists.txt index 59e307dd9ca90..c6604ca4c211f 100644 --- a/openmp/device/CMakeLists.txt +++ b/openmp/device/CMakeLists.txt @@ -57,7 +57,7 @@ endif() # Trick to combine these into a bitcode file via the linker's LTO pass. add_executable(libompdevice ${src_files}) set_target_properties(libompdevice PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + RUNTIME_OUTPUT_DIRECTORY "${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}" LINKER_LANGUAGE CXX BUILD_RPATH "" INSTALL_RPATH "" From 461fa43d2a593c3d05cc6edce82fb497dcb994d5 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 8 Sep 2025 16:27:39 -0500 Subject: [PATCH 3/3] Fix unchanged dep --- openmp/device/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmp/device/CMakeLists.txt b/openmp/device/CMakeLists.txt index c6604ca4c211f..ded961adcce1f 100644 --- a/openmp/device/CMakeLists.txt +++ b/openmp/device/CMakeLists.txt @@ -85,7 +85,7 @@ install(TARGETS libompdevice add_library(ompdevice.all_objs OBJECT IMPORTED) set_property(TARGET ompdevice.all_objs APPEND PROPERTY IMPORTED_OBJECTS - ${CMAKE_CURRENT_BINARY_DIR}/libomptarget-${target_name}.bc) + ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/libomptarget-${target_name}.bc) # Archive all the object files generated above into a static library add_library(ompdevice STATIC)