[Openmp-commits] [PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 1 12:24:51 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7a228f872fbb: [openmp] No longer use LIBRARY_PATH to find devicertl (authored by JonChesterfield).

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.370025.patch
Type: text/x-patch
Size: 1877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210901/5c5e9c3e/attachment.bin>


More information about the Openmp-commits mailing list