Index: llvm/trunk/tools/llvm-config/BuildVariables.inc.in =================================================================== --- llvm/trunk/tools/llvm-config/BuildVariables.inc.in +++ llvm/trunk/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@" Index: llvm/trunk/tools/llvm-config/llvm-config.cpp =================================================================== --- llvm/trunk/tools/llvm-config/llvm-config.cpp +++ llvm/trunk/tools/llvm-config/llvm-config.cpp @@ -333,7 +333,9 @@ } else { ActivePrefix = CurrentExecPrefix; ActiveIncludeDir = ActivePrefix + "/include"; - ActiveBinDir = ActivePrefix + "/bin"; + SmallString path(StringRef(LLVM_TOOLS_INSTALL_DIR)); + sys::fs::make_absolute(ActivePrefix, path); + ActiveBinDir = path.str(); ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; ActiveIncludeOption = "-I" + ActiveIncludeDir;