diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-12-01 20:00:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-12-01 20:00:19 +0000 |
commit | b3821996efeae84408133c92c28756c46f101658 (patch) | |
tree | 0c1b69a7268253d1e39f12d372fd11ce25fe68c4 /tools | |
parent | fc9261279aa140542cf9b7c2c384d000ad97aca0 (diff) | |
download | external_llvm-b3821996efeae84408133c92c28756c46f101658.zip external_llvm-b3821996efeae84408133c92c28756c46f101658.tar.gz external_llvm-b3821996efeae84408133c92c28756c46f101658.tar.bz2 |
llvm-config-2: Fix --cflags and --includedir which pointed at the wrong
directory when running from a build directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-config-2/llvm-config.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/llvm-config-2/llvm-config.cpp b/tools/llvm-config-2/llvm-config.cpp index fddd481..bf3357e 100644 --- a/tools/llvm-config-2/llvm-config.cpp +++ b/tools/llvm-config-2/llvm-config.cpp @@ -210,16 +210,15 @@ int main(int argc, char **argv) { std::string ActivePrefix, ActiveBinDir, ActiveIncludeDir, ActiveLibDir; std::string ActiveIncludeOption; if (IsInDevelopmentTree) { + ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include"; ActivePrefix = CurrentExecPrefix; // CMake organizes the products differently than a normal prefix style // layout. if (DevelopmentTreeLayoutIsCMakeStyle) { - ActiveIncludeDir = ActiveObjRoot + "/include"; ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE; ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE; } else { - ActiveIncludeDir = ActiveObjRoot + "/include"; ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin"; ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib"; } |