[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 2 15:04:02 PDT 2006
Changes in directory llvm/tools/llvm-config:
llvm-config.in.in updated: 1.13 -> 1.14
---
Log message:
Add flags to get access to build_mode, objdir, srcdir etc.
If installed, ignore the prefix the tree is configured with: always use the
prefix that llvm-config is currently at, which may be different if the tree
was moved.
---
Diffs of the changes: (+18 -9)
llvm-config.in.in | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.13 llvm/tools/llvm-config/llvm-config.in.in:1.14
--- llvm/tools/llvm-config/llvm-config.in.in:1.13 Fri Jun 2 16:48:10 2006
+++ llvm/tools/llvm-config/llvm-config.in.in Fri Jun 2 17:03:50 2006
@@ -66,17 +66,17 @@
my $ABS_OBJ_ROOT = `cd $LLVM_OBJ_ROOT/$LLVM_BUILDMODE; pwd`;
chomp($ABS_OBJ_ROOT);
-my $INCLUDEDIR = "$PREFIX/include";
-my $LIBDIR = "$PREFIX/lib";
-my $BINDIR = "$PREFIX/bin";
-$LIBDIR = "$ABS_RUN_DIR/lib";
-$BINDIR = "$ABS_RUN_DIR/bin";
+my $INCLUDEDIR = "$ABS_RUN_DIR/include";
+my $LIBDIR = "$ABS_RUN_DIR/lib";
+my $BINDIR = "$ABS_RUN_DIR/bin";
if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) {
# If we are running out of the build directory, the include dir is in the
# srcdir.
$INCLUDEDIR = "$LLVM_SRC_ROOT/include";
} else {
- $INCLUDEDIR = "$ABS_RUN_DIR/include";
+ # If installed, ignore the prefix the tree was configured with, use the
+ # current prefix.
+ $PREFIX = $ABS_RUN_DIR;
}
sub usage;
@@ -115,6 +115,12 @@
$has_opt = 1; print join(' ', name_map_entries), "\n";
} elsif ($arg eq "--targets-built") {
$has_opt = 1; print join(' ', @TARGETS_BUILT), "\n";
+ } elsif ($arg eq "--build-mode") {
+ $has_opt = 1; print "$LLVM_BUILDMODE\n";
+ } elsif ($arg eq "--obj-root") {
+ $has_opt = 1; print `cd $LLVM_OBJ_ROOT/; pwd` . "\n";
+ } elsif ($arg eq "--src-root") {
+ $has_opt = 1; print `cd $LLVM_SRC_ROOT/; pwd` . "\n";
} else {
usage();
}
@@ -159,17 +165,20 @@
llvm-config --libs engine bcreader scalaropts
Options:
- --version LLVM version.
- --prefix Installation prefix.
+ --version Print LLVM version.
+ --prefix Print the installation prefix.
+ --src-root Print the source root LLVM was built from.
+ --obj-root Print the object root used to build LLVM.
--bindir Directory containing LLVM executables.
--includedir Directory containing LLVM headers.
--libdir Directory containing LLVM libraries.
--cxxflags C++ compiler flags for files that include LLVM headers.
- --ldflags Linker flags.
+ --ldflags Print Linker flags.
--libs Libraries needed to link against LLVM components.
--libnames Bare library names for in-tree builds.
--components List of all possible components.
--targets-built List of all targets currently built.
+ --build-mode Print build mode of LLVM tree (e.g. Debug or Release).
Typical components:
all All LLVM libraries (default).
backend Either a native backend or the C backend.
More information about the llvm-commits
mailing list