summaryrefslogtreecommitdiff
path: root/tools/llvm-config/llvm-config.in.in
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-10-28 01:02:16 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-10-28 01:02:16 +0000
commitee826c8d9cab9e735b9b38acc5aab620fbc50afe (patch)
treefa604134e158dd33d53afa4dfd9dd73f982621cf /tools/llvm-config/llvm-config.in.in
parentc73d73eb881ebe7493e934c00ca1c474ffd0ed2d (diff)
downloadllvm-ee826c8d9cab9e735b9b38acc5aab620fbc50afe.tar.gz
llvm-ee826c8d9cab9e735b9b38acc5aab620fbc50afe.tar.bz2
llvm-ee826c8d9cab9e735b9b38acc5aab620fbc50afe.tar.xz
Have llvm-config --cppflags print correct flags when in CMake build directory
Previously, if invoked from a CMake build directory, 'llvm-config --cppflags' and friends would only print a -I flag for the build directory's header search path, because it would assume that it was already installed, not recognising its parent directory as being the build directory. Teach llvm-config about CMake build directories so that it prints a -I for both the source and build directory's search paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-config/llvm-config.in.in')
-rw-r--r--tools/llvm-config/llvm-config.in.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-config/llvm-config.in.in b/tools/llvm-config/llvm-config.in.in
index 03efb031bb..a456dc6e77 100644
--- a/tools/llvm-config/llvm-config.in.in
+++ b/tools/llvm-config/llvm-config.in.in
@@ -45,6 +45,7 @@ my $CXXFLAGS = q{@LLVM_CXXFLAGS@};
my $LDFLAGS = q{@LLVM_LDFLAGS@};
my $SYSTEM_LIBS = q{@LIBS@};
my $LLVM_BUILDMODE = q{@LLVM_BUILDMODE@};
+my $LLVM_OBJ_SUFFIX = q{@LLVM_OBJ_SUFFIX@};
#---- end Makefile values ----
# Figure out where llvm-config is being run from. Primarily, we care if it has
@@ -60,7 +61,7 @@ my $ABS_RUN_DIR = abs_path("$RUN_DIR/..");
chomp($ABS_RUN_DIR);
# Compute the absolute object directory build, e.g. "foo/llvm/Debug".
-my $ABS_OBJ_ROOT = "$LLVM_OBJ_ROOT/$LLVM_BUILDMODE";
+my $ABS_OBJ_ROOT = "$LLVM_OBJ_ROOT$LLVM_OBJ_SUFFIX";
$ABS_OBJ_ROOT = abs_path("$ABS_OBJ_ROOT") if (-d $ABS_OBJ_ROOT);
chomp($ABS_OBJ_ROOT);