Skip to content

Commit 6d0d50f

Browse files
authored
[OpenMP] Update the bitcode library install and search path (#136754)
Summary: This was accidentally kept in the old location when we moved to the new `lib/<triple>/` location for the DeviceRTL. Move this to reduce the delta with #136729.
1 parent 92bba68 commit 6d0d50f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,6 +2794,11 @@ void tools::addOpenMPDeviceRTL(const Driver &D,
27942794
for (const auto &LibPath : HostTC.getFilePaths())
27952795
LibraryPaths.emplace_back(LibPath);
27962796

2797+
// Check the target specific library path for the triple as well.
2798+
SmallString<128> P(D.Dir);
2799+
llvm::sys::path::append(P, "..", "lib", Triple.getTriple());
2800+
LibraryPaths.emplace_back(P);
2801+
27972802
OptSpecifier LibomptargetBCPathOpt =
27982803
Triple.isAMDGCN() ? options::OPT_libomptarget_amdgpu_bc_path_EQ
27992804
: Triple.isNVPTX() ? options::OPT_libomptarget_nvptx_bc_path_EQ

offload/DeviceRTL/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function(compileDeviceRTLLibrary target_name target_triple)
137137
"-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm" "-march=")
138138
install(TARGETS libomptarget-${target_name}
139139
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
140-
DESTINATION ${OFFLOAD_INSTALL_LIBDIR})
140+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${target_triple}")
141141

142142
add_library(omptarget.${target_name}.all_objs OBJECT IMPORTED)
143143
set_property(TARGET omptarget.${target_name}.all_objs APPEND PROPERTY IMPORTED_OBJECTS

0 commit comments

Comments
 (0)