mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-29 14:42:01 +00:00
Simplify the handling of the --*flags options. The makefile already gets it
right so there is no need to duplicate logic, just use the values the makefile provides. Eliminate some redundnt -D options from the output. Fix the help output so it fits on 80 cols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38488 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4a2c083bdd
commit
087d90e912
@ -42,7 +42,6 @@ my $TARGET_TRIPLE = q{@target@};
|
||||
my $TARGETS_TO_BUILD = q{@TARGETS_TO_BUILD@};
|
||||
my $TARGET_HAS_JIT = q{@TARGET_HAS_JIT@};
|
||||
my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@};
|
||||
my $EXPENSIVE_CHECKS = q{@EXPENSIVE_CHECKS@};
|
||||
#---- end autoconf values ----
|
||||
|
||||
# Must pretend x86_64 architecture is really x86, otherwise the native backend
|
||||
@ -115,17 +114,11 @@ foreach my $arg (@ARGV) {
|
||||
} elsif ($arg eq "--libdir") {
|
||||
$has_opt = 1; print "$LIBDIR\n";
|
||||
} elsif ($arg eq "--cppflags") {
|
||||
$has_opt = 1;
|
||||
my $cppopts = get_cpp_opts();
|
||||
print "$cppopts\n";
|
||||
$has_opt = 1; print "-I$INCLUDEDIR $CPPFLAGS\n";
|
||||
} elsif ($arg eq "--cflags") {
|
||||
$has_opt = 1;
|
||||
my $cppopts = get_cpp_opts();
|
||||
print "$cppopts $CFLAGS\n";
|
||||
$has_opt = 1; print "-I$INCLUDEDIR $CFLAGS\n";
|
||||
} elsif ($arg eq "--cxxflags") {
|
||||
$has_opt = 1;
|
||||
my $cppopts = get_cpp_opts();
|
||||
print "$cppopts $CXXFLAGS\n";
|
||||
$has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n";
|
||||
} elsif ($arg eq "--ldflags") {
|
||||
$has_opt = 1; print "-L$LIBDIR $LDFLAGS $SYSTEM_LIBS\n";
|
||||
} elsif ($arg eq "--libs") {
|
||||
@ -216,20 +209,6 @@ __EOD__
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# Return cpp flags used to build llvm.
|
||||
sub get_cpp_opts {
|
||||
my $opts = "";
|
||||
|
||||
if ($EXPENSIVE_CHECKS eq "yes") {
|
||||
$opts = "-D_GLIBCXX_DEBUG -I$INCLUDEDIR $CPPFLAGS";
|
||||
}
|
||||
else {
|
||||
$opts = "-I$INCLUDEDIR $CPPFLAGS";
|
||||
}
|
||||
|
||||
return $opts;
|
||||
}
|
||||
|
||||
# Use -lfoo instead of libfoo.a whenever possible, and add directories to
|
||||
# files which can't be found using -L.
|
||||
sub fix_library_names (@) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user