Changes in directory llvm/tools/llvm-config:
llvm-config.in.in updated: 1.15 -> 1.16 --- Log message: Add a new --libfiles option, for getting fully-qualified pathnames to libraries. This can be used for tools that want makefile rules to depend on the libraries (e.g. so the tool is relinked when a library changes). --- Diffs of the changes: (+19 -7) llvm-config.in.in | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) Index: llvm/tools/llvm-config/llvm-config.in.in diff -u llvm/tools/llvm-config/llvm-config.in.in:1.15 llvm/tools/llvm-config/llvm-config.in.in:1.16 --- llvm/tools/llvm-config/llvm-config.in.in:1.15 Fri Jun 2 18:43:27 2006 +++ llvm/tools/llvm-config/llvm-config.in.in Tue Jun 6 17:38:29 2006 @@ -81,6 +81,7 @@ sub usage; sub fix_library_names (@); +sub fix_library_files (@); sub expand_dependecies (@); sub name_map_entries; @@ -90,6 +91,7 @@ my $has_opt = 0; my $want_libs = 0; my $want_libnames = 0; +my $want_libfiles = 0; my $want_components = 0; foreach my $arg (@ARGV) { if ($arg =~ /^-/) { @@ -113,6 +115,8 @@ $has_opt = 1; $want_libs = 1; } elsif ($arg eq "--libnames") { $has_opt = 1; $want_libnames = 1; + } elsif ($arg eq "--libfiles") { + $has_opt = 1; $want_libfiles = 1; } elsif ($arg eq "--components") { $has_opt = 1; print join(' ', name_map_entries), "\n"; } elsif ($arg eq "--targets-built") { @@ -140,14 +144,11 @@ } # Handle any arguments which require building our dependency graph. -if ($want_libs || $want_libnames) { +if ($want_libs || $want_libnames || $want_libfiles) { my @libs = expand_dependecies(@components); - if ($want_libs) { - print join(' ', fix_library_names(@libs)), "\n"; - } - if ($want_libnames) { - print join(' ', @libs), "\n"; - } + print join(' ', fix_library_names(@libs)), "\n" if ($want_libs); + print join(' ', @libs), "\n" if ($want_libnames); + print join(' ', fix_library_files(@libs)), "\n" if ($want_libfiles); } exit 0; @@ -178,6 +179,7 @@ --ldflags Print Linker flags. --libs Libraries needed to link against LLVM components. --libnames Bare library names for in-tree builds. + --libfiles Fully qualified library filenames for makefile depends. --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). @@ -206,6 +208,16 @@ return @result; } +# Turn the list of libraries into a list of files. +sub fix_library_files(@) { + my @libs = @_; + my @result; + foreach my $lib (@libs) { + # Transform the bare library name into a filename. + push @result, "$LIBDIR/$lib"; + } + return @result; +} #========================================================================== # Library Dependency Analysis _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits