mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 16:54:48 +00:00
Fix http://llvm.org/PR4481: Make llvm-config print the right include paths when
srcdir!=objdir. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74956 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
120505d5e7
commit
9a3b13fa9b
@ -81,12 +81,15 @@ $ABS_OBJ_ROOT = `cd $ABS_OBJ_ROOT; $PWD` if (-d $ABS_OBJ_ROOT);
|
|||||||
chomp($ABS_OBJ_ROOT);
|
chomp($ABS_OBJ_ROOT);
|
||||||
|
|
||||||
my $INCLUDEDIR = "$ABS_RUN_DIR/include";
|
my $INCLUDEDIR = "$ABS_RUN_DIR/include";
|
||||||
|
my $INCLUDEOPTION = "-I$INCLUDEDIR";
|
||||||
my $LIBDIR = "$ABS_RUN_DIR/lib";
|
my $LIBDIR = "$ABS_RUN_DIR/lib";
|
||||||
my $BINDIR = "$ABS_RUN_DIR/bin";
|
my $BINDIR = "$ABS_RUN_DIR/bin";
|
||||||
if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) {
|
if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) {
|
||||||
# If we are running out of the build directory, the include dir is in the
|
# If we are running out of the build directory, the include dir is in the
|
||||||
# srcdir.
|
# srcdir.
|
||||||
$INCLUDEDIR = "$LLVM_SRC_ROOT/include";
|
$INCLUDEDIR = "$LLVM_SRC_ROOT/include";
|
||||||
|
# We need include files from both the srcdir and objdir.
|
||||||
|
$INCLUDEOPTION = "-I$INCLUDEDIR -I$LLVM_OBJ_ROOT/include"
|
||||||
} else {
|
} else {
|
||||||
# If installed, ignore the prefix the tree was configured with, use the
|
# If installed, ignore the prefix the tree was configured with, use the
|
||||||
# current prefix.
|
# current prefix.
|
||||||
@ -120,11 +123,11 @@ foreach my $arg (@ARGV) {
|
|||||||
} elsif ($arg eq "--libdir") {
|
} elsif ($arg eq "--libdir") {
|
||||||
$has_opt = 1; print "$LIBDIR\n";
|
$has_opt = 1; print "$LIBDIR\n";
|
||||||
} elsif ($arg eq "--cppflags") {
|
} elsif ($arg eq "--cppflags") {
|
||||||
$has_opt = 1; print "-I$INCLUDEDIR $CPPFLAGS\n";
|
$has_opt = 1; print "$INCLUDEOPTION $CPPFLAGS\n";
|
||||||
} elsif ($arg eq "--cflags") {
|
} elsif ($arg eq "--cflags") {
|
||||||
$has_opt = 1; print "-I$INCLUDEDIR $CFLAGS\n";
|
$has_opt = 1; print "$INCLUDEOPTION $CFLAGS\n";
|
||||||
} elsif ($arg eq "--cxxflags") {
|
} elsif ($arg eq "--cxxflags") {
|
||||||
$has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n";
|
$has_opt = 1; print "$INCLUDEOPTION $CXXFLAGS\n";
|
||||||
} elsif ($arg eq "--ldflags") {
|
} elsif ($arg eq "--ldflags") {
|
||||||
$has_opt = 1; print "-L$LIBDIR $LDFLAGS $SYSTEM_LIBS\n";
|
$has_opt = 1; print "-L$LIBDIR $LDFLAGS $SYSTEM_LIBS\n";
|
||||||
} elsif ($arg eq "--libs") {
|
} elsif ($arg eq "--libs") {
|
||||||
|
Loading…
Reference in New Issue
Block a user