|
 |
4ca785f |
diff -ru llvm-8.0.0rc1.src.orig/cmake/modules/CMakeLists.txt llvm-8.0.0rc1.src/cmake/modules/CMakeLists.txt
|
|
 |
4ca785f |
--- llvm-8.0.0rc1.src.orig/cmake/modules/CMakeLists.txt 2019-02-12 11:32:02.370238762 +0000
|
|
 |
4ca785f |
+++ llvm-8.0.0rc1.src/cmake/modules/CMakeLists.txt 2019-02-13 08:40:39.263265812 +0000
|
|
 |
4ca785f |
@@ -94,7 +94,7 @@
|
|
 |
4ca785f |
set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
|
|
 |
4ca785f |
set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
|
|
 |
4ca785f |
set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
|
|
 |
4ca785f |
-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
|
|
 |
4ca785f |
+set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_TOOLS_INSTALL_DIR}")
|
|
 |
4ca785f |
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
|
|
 |
4ca785f |
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
|
|
 |
4ca785f |
configure_file(
|
|
 |
4ca785f |
diff -ru llvm-8.0.0rc1.src.orig/tools/llvm-config/llvm-config.cpp llvm-8.0.0rc1.src/tools/llvm-config/llvm-config.cpp
|
|
 |
4ca785f |
--- llvm-8.0.0rc1.src.orig/tools/llvm-config/llvm-config.cpp 2019-02-12 11:32:00.617221180 +0000
|
|
 |
4ca785f |
+++ llvm-8.0.0rc1.src/tools/llvm-config/llvm-config.cpp 2019-02-12 11:34:27.817599362 +0000
|
|
 |
4ca785f |
@@ -269,7 +269,6 @@
|
|
 |
4ca785f |
// tree.
|
|
 |
4ca785f |
bool IsInDevelopmentTree;
|
|
 |
4ca785f |
enum { CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout;
|
|
 |
4ca785f |
- llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
|
|
 |
4ca785f |
std::string CurrentExecPrefix;
|
|
 |
4ca785f |
std::string ActiveObjRoot;
|
|
 |
4ca785f |
|
|
 |
4ca785f |
@@ -280,11 +279,15 @@
|
|
 |
4ca785f |
build_mode = CMAKE_CFG_INTDIR;
|
|
 |
4ca785f |
#endif
|
|
 |
4ca785f |
|
|
 |
4ca785f |
- // Create an absolute path, and pop up one directory (we expect to be inside a
|
|
 |
4ca785f |
- // bin dir).
|
|
 |
4ca785f |
- sys::fs::make_absolute(CurrentPath);
|
|
 |
4ca785f |
- CurrentExecPrefix =
|
|
 |
4ca785f |
- sys::path::parent_path(sys::path::parent_path(CurrentPath)).str();
|
|
 |
4ca785f |
+ // Create an absolute path, and pop up as much directory as in LLVM_TOOLS_INSTALL_DIR
|
|
 |
4ca785f |
+ {
|
|
 |
4ca785f |
+ llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
|
|
 |
4ca785f |
+ sys::fs::make_absolute(CurrentPath);
|
|
 |
4ca785f |
+ for (auto iter = sys::path::begin(LLVM_TOOLS_INSTALL_DIR), end = sys::path::end(LLVM_TOOLS_INSTALL_DIR); iter != end; ++iter) {
|
|
 |
4ca785f |
+ CurrentPath = sys::path::parent_path(CurrentPath).str();
|
|
 |
4ca785f |
+ }
|
|
 |
4ca785f |
+ CurrentExecPrefix = sys::path::parent_path(CurrentPath).str();
|
|
 |
4ca785f |
+ }
|
|
 |
4ca785f |
|
|
 |
4ca785f |
// Check to see if we are inside a development tree by comparing to possible
|
|
 |
4ca785f |
// locations (prefix style or CMake style).
|