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

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 10:30:01 PDT 2024


================
@@ -38,13 +38,36 @@ 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(CMAKE_INSTALL_FULL_LIBDIR);
----------------
nico wrote:

"Installed" isn't a concept that always makes sense. On Windows, there's no system install. Even on other platforms, projects might download a hermetic toolchain to a random subdirectory.

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


More information about the llvm-commits mailing list