mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 20:34:38 +00:00
Add an option for getting the C compiler flags, --cflags.
Patch contributed by Chandler Carruth git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
80c6c3bbff
commit
f72538ee2e
@ -20,6 +20,7 @@ include $(LEVEL)/Makefile.common
|
|||||||
ifeq ($(HAVE_PERL),1)
|
ifeq ($(HAVE_PERL),1)
|
||||||
|
|
||||||
# Combine preprocessor flags (except for -I) and CXX flags.
|
# Combine preprocessor flags (except for -I) and CXX flags.
|
||||||
|
SUB_CFLAGS = ${CPP.BaseFlags} ${C.Flags}
|
||||||
SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags}
|
SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags}
|
||||||
|
|
||||||
# This is blank for now. We need to be careful about adding stuff here:
|
# This is blank for now. We need to be careful about adding stuff here:
|
||||||
@ -55,6 +56,7 @@ llvm-config.in: $(ConfigInIn) $(ConfigStatusScript)
|
|||||||
# Build our final script.
|
# Build our final script.
|
||||||
$(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps)
|
$(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps)
|
||||||
$(Echo) "Building llvm-config script."
|
$(Echo) "Building llvm-config script."
|
||||||
|
$(Verb) $(ECHO) 's,@LLVM_CFLAGS@,$(SUB_CFLAGS),' > temp.sed
|
||||||
$(Verb) $(ECHO) 's,@LLVM_CXXFLAGS@,$(SUB_CXXFLAGS),' > temp.sed
|
$(Verb) $(ECHO) 's,@LLVM_CXXFLAGS@,$(SUB_CXXFLAGS),' > temp.sed
|
||||||
$(Verb) $(ECHO) 's,@LLVM_LDFLAGS@,$(SUB_LDFLAGS),' >> temp.sed
|
$(Verb) $(ECHO) 's,@LLVM_LDFLAGS@,$(SUB_LDFLAGS),' >> temp.sed
|
||||||
$(Verb) $(ECHO) 's,@LLVM_BUILDMODE@,$(BuildMode),' >> temp.sed
|
$(Verb) $(ECHO) 's,@LLVM_BUILDMODE@,$(BuildMode),' >> temp.sed
|
||||||
|
@ -45,6 +45,7 @@ my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@};
|
|||||||
#---- end autoconf values ----
|
#---- end autoconf values ----
|
||||||
|
|
||||||
#---- begin Makefile values ----
|
#---- begin Makefile values ----
|
||||||
|
my $CFLAGS = q{@LLVM_CFLAGS@};
|
||||||
my $CXXFLAGS = q{@LLVM_CXXFLAGS@};
|
my $CXXFLAGS = q{@LLVM_CXXFLAGS@};
|
||||||
my $LDFLAGS = q{@LLVM_LDFLAGS@};
|
my $LDFLAGS = q{@LLVM_LDFLAGS@};
|
||||||
my $SYSTEM_LIBS = q{@LIBS@};
|
my $SYSTEM_LIBS = q{@LIBS@};
|
||||||
@ -107,6 +108,8 @@ foreach my $arg (@ARGV) {
|
|||||||
$has_opt = 1; print "$INCLUDEDIR\n";
|
$has_opt = 1; print "$INCLUDEDIR\n";
|
||||||
} elsif ($arg eq "--libdir") {
|
} elsif ($arg eq "--libdir") {
|
||||||
$has_opt = 1; print "$LIBDIR\n";
|
$has_opt = 1; print "$LIBDIR\n";
|
||||||
|
} elsif ($arg eq "--cflags") {
|
||||||
|
$has_opt = 1; print "-I$INCLUDEDIR $CFLAGS\n";
|
||||||
} elsif ($arg eq "--cxxflags") {
|
} elsif ($arg eq "--cxxflags") {
|
||||||
$has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n";
|
$has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n";
|
||||||
} elsif ($arg eq "--ldflags") {
|
} elsif ($arg eq "--ldflags") {
|
||||||
@ -178,6 +181,7 @@ Options:
|
|||||||
--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.
|
||||||
|
--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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user