[llvm-commits] CVS: llvm/tools/llvm-config/Makefile llvm-config.in.in
Reid Spencer
reid at x10sys.com
Fri Jan 5 18:48:18 PST 2007
Changes in directory llvm/tools/llvm-config:
Makefile updated: 1.19 -> 1.20
llvm-config.in.in updated: 1.23 -> 1.24
---
Log message:
Add an option for getting the C compiler flags, --cflags.
Patch contributed by Chandler Carruth
---
Diffs of the changes: (+6 -0)
Makefile | 2 ++
llvm-config.in.in | 4 ++++
2 files changed, 6 insertions(+)
Index: llvm/tools/llvm-config/Makefile
diff -u llvm/tools/llvm-config/Makefile:1.19 llvm/tools/llvm-config/Makefile:1.20
--- llvm/tools/llvm-config/Makefile:1.19 Mon Dec 11 18:43:38 2006
+++ llvm/tools/llvm-config/Makefile Fri Jan 5 20:48:03 2007
@@ -20,6 +20,7 @@
ifeq ($(HAVE_PERL),1)
# Combine preprocessor flags (except for -I) and CXX flags.
+SUB_CFLAGS = ${CPP.BaseFlags} ${C.Flags}
SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags}
# This is blank for now. We need to be careful about adding stuff here:
@@ -55,6 +56,7 @@
# Build our final script.
$(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps)
$(Echo) "Building llvm-config script."
+ $(Verb) $(ECHO) 's, at LLVM_CFLAGS@,$(SUB_CFLAGS),' > temp.sed
$(Verb) $(ECHO) 's, at LLVM_CXXFLAGS@,$(SUB_CXXFLAGS),' > temp.sed
$(Verb) $(ECHO) 's, at LLVM_LDFLAGS@,$(SUB_LDFLAGS),' >> temp.sed
$(Verb) $(ECHO) 's, at LLVM_BUILDMODE@,$(BuildMode),' >> temp.sed
Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.23 llvm/tools/llvm-config/llvm-config.in.in:1.24
--- llvm/tools/llvm-config/llvm-config.in.in:1.23 Mon Sep 4 00:35:23 2006
+++ llvm/tools/llvm-config/llvm-config.in.in Fri Jan 5 20:48:03 2007
@@ -45,6 +45,7 @@
#---- end autoconf values ----
#---- begin Makefile values ----
+my $CFLAGS = q{@LLVM_CFLAGS@};
my $CXXFLAGS = q{@LLVM_CXXFLAGS@};
my $LDFLAGS = q{@LLVM_LDFLAGS@};
my $SYSTEM_LIBS = q{@LIBS@};
@@ -107,6 +108,8 @@
$has_opt = 1; print "$INCLUDEDIR\n";
} elsif ($arg eq "--libdir") {
$has_opt = 1; print "$LIBDIR\n";
+ } elsif ($arg eq "--cflags") {
+ $has_opt = 1; print "-I$INCLUDEDIR $CFLAGS\n";
} elsif ($arg eq "--cxxflags") {
$has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n";
} elsif ($arg eq "--ldflags") {
@@ -178,6 +181,7 @@
--bindir Directory containing LLVM executables.
--includedir Directory containing LLVM headers.
--libdir Directory containing LLVM libraries.
+ --cflags C compiler flags for files that include LLVM headers.
--cxxflags C++ compiler flags for files that include LLVM headers.
--ldflags Print Linker flags.
--libs Libraries needed to link against LLVM components.
More information about the llvm-commits
mailing list