[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl
Jon Chesterfield via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 1 13:39:54 PDT 2021
JonChesterfield updated this revision to Diff 370047.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109061/new/
https://reviews.llvm.org/D109061
Files:
clang/lib/Driver/ToolChains/CommonArgs.cpp
openmp/libomptarget/test/lit.cfg
Index: openmp/libomptarget/test/lit.cfg
===================================================================
--- openmp/libomptarget/test/lit.cfg
+++ openmp/libomptarget/test/lit.cfg
@@ -89,9 +89,10 @@
config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory
if config.cuda_libdir:
config.test_flags += " -Wl,-rpath," + config.cuda_libdir
- append_dynamic_library_path('LIBRARY_PATH', config.library_dir, ":")
- append_dynamic_library_path('LIBRARY_PATH', \
- config.omp_host_rtl_directory, ":")
+ if config.libomptarget_current_target.startswith('amdgcn'):
+ config.test_flags += " --libomptarget-amdgcn-bc-path=" + config.library_dir
+ if config.libomptarget_current_target.startswith('nvptx'):
+ config.test_flags += " --libomptarget-nvptx-bc-path=" + config.library_dir
# substitutions
# - for targets that exist in the system create the actual command.
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -1688,18 +1688,8 @@
StringRef BitcodeSuffix,
const llvm::Triple &Triple) {
SmallVector<StringRef, 8> LibraryPaths;
- // Add user defined library paths from LIBRARY_PATH.
- llvm::Optional<std::string> LibPath =
- llvm::sys::Process::GetEnv("LIBRARY_PATH");
- if (LibPath) {
- SmallVector<StringRef, 8> Frags;
- const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator, '\0'};
- llvm::SplitString(*LibPath, Frags, EnvPathSeparatorStr);
- for (StringRef Path : Frags)
- LibraryPaths.emplace_back(Path.trim());
- }
-
- // Add path to lib / lib64 folder.
+
+ // Add path to clang lib / lib64 folder.
SmallString<256> DefaultLibPath = llvm::sys::path::parent_path(D.Dir);
llvm::sys::path::append(DefaultLibPath, Twine("lib") + CLANG_LIBDIR_SUFFIX);
LibraryPaths.emplace_back(DefaultLibPath.c_str());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109061.370047.patch
Type: text/x-patch
Size: 2044 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210901/b32bc3a8/attachment.bin>
More information about the cfe-commits
mailing list