[llvm] [BOLT] Enable standalone build (PR #97130)

Rafael Auler via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 10:09:20 PDT 2024


================
@@ -38,13 +38,37 @@ std::string RuntimeLibrary::getLibPath(StringRef ToolPath,
     llvm::sys::path::append(LibPath, "lib" LLVM_LIBDIR_SUFFIX);
   }
   llvm::sys::path::append(LibPath, LibFileName);
-  if (!llvm::sys::fs::exists(LibPath)) {
-    errs() << "BOLT-ERROR: library not found: " << LibPath << "\n";
-    exit(1);
-  }
   return std::string(LibPath);
 }
 
+std::string RuntimeLibrary::getLibPathByInstalled(StringRef LibFileName) {
+  SmallString<128> LibPath =
+      llvm::sys::path::root_path(CMAKE_INSTALL_FULL_LIBDIR);
----------------
rafaelauler wrote:

I still don't understand what's your goal here with a call to "root_path"... this will essentially wipe out any folders in CMAKE_INSTALL_FULL_LIBDIR and use only root  "/" in unix or "C:" in Windows.

I think at this point you just want to use CMAKE_INSTALL_FULL_LIBDIR as is?

https://github.com/llvm/llvm-project/pull/97130


More information about the llvm-commits mailing list