[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 12:22:44 PDT 2021
JonChesterfield updated this revision to Diff 370024.
JonChesterfield added a comment.
- rebase
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
@@ -92,6 +92,10 @@
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.370024.patch
Type: text/x-patch
Size: 1877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210901/1f295048/attachment.bin>
More information about the cfe-commits
mailing list