[PATCH] D22499: [llvm-config] Report --bindir based on LLVM_TOOLS_INSTALL_DIR

Keno Fischer via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 21:53:54 PDT 2016


loladiro created this revision.
loladiro added a reviewer: beanz.
loladiro added a subscriber: llvm-commits.
loladiro set the repository for this revision to rL LLVM.

`LLVM_TOOLS_INSTALL_DIR` was introduced in r272200 in order to override the directory
name into which to install LLVM's executable. However, `llvm-config --bindir` still reported
`$PREFIX/bin` independent of what LLVM_TOOLS_INSTALL_DIR was set to.

This fixes the out-of-tree clang standalone build for me. 

Repository:
  rL LLVM

https://reviews.llvm.org/D22499

Files:
  tools/llvm-config/BuildVariables.inc.in
  tools/llvm-config/llvm-config.cpp

Index: tools/llvm-config/llvm-config.cpp
===================================================================
--- tools/llvm-config/llvm-config.cpp
+++ tools/llvm-config/llvm-config.cpp
@@ -328,7 +328,7 @@
   } else {
     ActivePrefix = CurrentExecPrefix;
     ActiveIncludeDir = ActivePrefix + "/include";
-    ActiveBinDir = ActivePrefix + "/bin";
+    ActiveBinDir = ActivePrefix + "/" + LLVM_TOOLS_INSTALL_DIR;
     ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
     ActiveIncludeOption = "-I" + ActiveIncludeDir;
   }
Index: tools/llvm-config/BuildVariables.inc.in
===================================================================
--- tools/llvm-config/BuildVariables.inc.in
+++ tools/llvm-config/BuildVariables.inc.in
@@ -34,3 +34,4 @@
 #define LLVM_DYLIB_COMPONENTS "@LLVM_DYLIB_COMPONENTS@"
 #define LLVM_DYLIB_VERSION "@LLVM_DYLIB_VERSION@"
 #define LLVM_HAS_GLOBAL_ISEL "@LLVM_HAS_GLOBAL_ISEL@"
+#define LLVM_TOOLS_INSTALL_DIR "@LLVM_TOOLS_INSTALL_DIR@"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22499.64444.patch
Type: text/x-patch
Size: 979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/d8e62688/attachment.bin>


More information about the llvm-commits mailing list