mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01: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. llvm-svn: 38488
This commit is contained in:
parent
00dacd0fa9
commit
47c93f0fe5
@ -42,7 +42,6 @@ my $TARGET_TRIPLE = q{@target@};
|
|||||||
my $TARGETS_TO_BUILD = q{@TARGETS_TO_BUILD@};
|
my $TARGETS_TO_BUILD = q{@TARGETS_TO_BUILD@};
|
||||||
my $TARGET_HAS_JIT = q{@TARGET_HAS_JIT@};
|
my $TARGET_HAS_JIT = q{@TARGET_HAS_JIT@};
|
||||||
my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@};
|
my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@};
|
||||||
my $EXPENSIVE_CHECKS = q{@EXPENSIVE_CHECKS@};
|
|
||||||
#---- end autoconf values ----
|
#---- end autoconf values ----
|
||||||
|
|
||||||
# Must pretend x86_64 architecture is really x86, otherwise the native backend
|
# Must pretend x86_64 architecture is really x86, otherwise the native backend
|
||||||
@ -115,17 +114,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;
|
$has_opt = 1; print "-I$INCLUDEDIR $CPPFLAGS\n";
|
||||||
my $cppopts = get_cpp_opts();
|
|
||||||
print "$cppopts\n";
|
|
||||||
} elsif ($arg eq "--cflags") {
|
} elsif ($arg eq "--cflags") {
|
||||||
$has_opt = 1;
|
$has_opt = 1; print "-I$INCLUDEDIR $CFLAGS\n";
|
||||||
my $cppopts = get_cpp_opts();
|
|
||||||
print "$cppopts $CFLAGS\n";
|
|
||||||
} elsif ($arg eq "--cxxflags") {
|
} elsif ($arg eq "--cxxflags") {
|
||||||
$has_opt = 1;
|
$has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n";
|
||||||
my $cppopts = get_cpp_opts();
|
|
||||||
print "$cppopts $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") {
|
||||||
@ -190,46 +183,32 @@ LLVM. Typically called from 'configure' scripts. Examples:
|
|||||||
llvm-config --libs engine bcreader scalaropts
|
llvm-config --libs engine bcreader scalaropts
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--version Print LLVM version.
|
--version Print LLVM version.
|
||||||
--prefix Print the installation prefix.
|
--prefix Print the installation prefix.
|
||||||
--src-root Print the source root LLVM was built from.
|
--src-root Print the source root LLVM was built from.
|
||||||
--obj-root Print the object root used to build LLVM.
|
--obj-root Print the object root used to build LLVM.
|
||||||
--bindir Directory containing LLVM executables.
|
--bindir Directory containing LLVM executables.
|
||||||
--includedir Directory containing LLVM headers.
|
--includedir Directory containing LLVM headers.
|
||||||
--libdir Directory containing LLVM libraries.
|
--libdir Directory containing LLVM libraries.
|
||||||
--cppflags C preprocessor flags for files that include LLVM headers.
|
--cppflags C preprocessor flags for files that include LLVM headers.
|
||||||
--cflags C compiler flags for files that include LLVM headers.
|
--cflags C compiler flags for files that include LLVM headers.
|
||||||
--cxxflags C++ compiler flags for files that include LLVM headers.
|
--cxxflags C++ compiler flags for files that include LLVM headers.
|
||||||
--ldflags Print Linker flags.
|
--ldflags Print Linker flags.
|
||||||
--libs Libraries needed to link against LLVM components.
|
--libs Libraries needed to link against LLVM components.
|
||||||
--libnames Bare library names for in-tree builds.
|
--libnames Bare library names for in-tree builds.
|
||||||
--libfiles Fully qualified library filenames for makefile depends.
|
--libfiles Fully qualified library filenames for makefile depends.
|
||||||
--components List of all possible components.
|
--components List of all possible components.
|
||||||
--targets-built List of all targets currently built.
|
--targets-built List of all targets currently built.
|
||||||
--host-target Target triple used to configure LLVM.
|
--host-target Target triple used to configure LLVM.
|
||||||
--build-mode Print build mode of LLVM tree (e.g. Debug or Release).
|
--build-mode Print build mode of LLVM tree (e.g. Debug or Release).
|
||||||
Typical components:
|
Typical components:
|
||||||
all All LLVM libraries (default).
|
all All LLVM libraries (default).
|
||||||
backend Either a native backend or the C backend.
|
backend Either a native backend or the C backend.
|
||||||
engine Either a native JIT or a bytecode interpreter.
|
engine Either a native JIT or a bytecode interpreter.
|
||||||
__EOD__
|
__EOD__
|
||||||
exit(1);
|
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
|
# Use -lfoo instead of libfoo.a whenever possible, and add directories to
|
||||||
# files which can't be found using -L.
|
# files which can't be found using -L.
|
||||||
sub fix_library_names (@) {
|
sub fix_library_names (@) {
|
||||||
|
Loading…
Reference in New Issue
Block a user