mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-04 06:12:18 +00:00
Add support for the LLVM C++ frontend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f1f371d12
commit
a9028e68b1
@ -40,11 +40,13 @@ endif
|
|||||||
#
|
#
|
||||||
LCC = $(LLVMGCCDIR)/bin/gcc
|
LCC = $(LLVMGCCDIR)/bin/gcc
|
||||||
LCC1 = $(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH)/cc1
|
LCC1 = $(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH)/cc1
|
||||||
LGCCLD = $(TOOLS)/gccld -L$(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH) -L$(LLVMGCCDIR)/lib
|
LCXX = $(LLVMGCCDIR)/bin/g++
|
||||||
|
LCC1XX = $(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH)/cc1plus
|
||||||
LLI = $(TOOLS)/lli
|
LLI = $(TOOLS)/lli
|
||||||
LLC = $(TOOLS)/llc
|
LLC = $(TOOLS)/llc
|
||||||
LAS = $(TOOLS)/as
|
LAS = $(TOOLS)/as
|
||||||
LGCCAS = $(TOOLS)/gccas
|
LGCCAS = $(TOOLS)/gccas
|
||||||
|
LGCCLD = $(TOOLS)/gccld -L$(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH) -L$(LLVMGCCDIR)/lib
|
||||||
LDIS = $(TOOLS)/dis
|
LDIS = $(TOOLS)/dis
|
||||||
LOPT = $(TOOLS)/opt
|
LOPT = $(TOOLS)/opt
|
||||||
LLINK = $(TOOLS)/link
|
LLINK = $(TOOLS)/link
|
||||||
@ -52,6 +54,7 @@ LANALYZE = $(TOOLS)/analyze
|
|||||||
LBUGPOINT= $(TOOLS)/bugpoint
|
LBUGPOINT= $(TOOLS)/bugpoint
|
||||||
|
|
||||||
LCCFLAGS += -O2 -Wall
|
LCCFLAGS += -O2 -Wall
|
||||||
|
LCXXFLAGS += -O2 -Wall
|
||||||
LLCFLAGS =
|
LLCFLAGS =
|
||||||
FAILURE = $(LEVEL)/test/Failure.sh
|
FAILURE = $(LEVEL)/test/Failure.sh
|
||||||
TESTRUNR = $(LEVEL)/test/TestRunner.sh
|
TESTRUNR = $(LEVEL)/test/TestRunner.sh
|
||||||
@ -80,6 +83,10 @@ clean::
|
|||||||
Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES)
|
Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES)
|
||||||
$(LCC) $(LCCFLAGS) -S $< -o $@
|
$(LCC) $(LCCFLAGS) -S $< -o $@
|
||||||
|
|
||||||
|
# Compile from X.cpp to Output/X.ll
|
||||||
|
Output/%.ll: %.cpp $(LCC1XX) Output/.dir $(INCLUDES)
|
||||||
|
$(LCXX) $(LCXXFLAGS) -S $< -o $@
|
||||||
|
|
||||||
# LLVM Assemble from Output/X.ll to Output/X.bc. Output/X.ll must have come
|
# LLVM Assemble from Output/X.ll to Output/X.bc. Output/X.ll must have come
|
||||||
# from GCC output, so use GCCAS.
|
# from GCC output, so use GCCAS.
|
||||||
#
|
#
|
||||||
@ -100,6 +107,11 @@ Output/%.tll: %.c $(LCC1) Output/.dir $(INCLUDES)
|
|||||||
$(LCC) $(LCCFLAGS) -S $< -o $@ || \
|
$(LCC) $(LCCFLAGS) -S $< -o $@ || \
|
||||||
( rm -f $@; $(FAILURE) $@ )
|
( rm -f $@; $(FAILURE) $@ )
|
||||||
|
|
||||||
|
Output/%.tll: %.cpp $(LCC1XX) Output/.dir $(INCLUDES)
|
||||||
|
@echo "======== Compiling $<"
|
||||||
|
$(LCXX) $(LCXXFLAGS) -S $< -o $@ || \
|
||||||
|
( rm -f $@; $(FAILURE) $@ )
|
||||||
|
|
||||||
Output/%.tbc: Output/%.tll $(LAS)
|
Output/%.tbc: Output/%.tll $(LAS)
|
||||||
@echo "======== Assembling $<"
|
@echo "======== Assembling $<"
|
||||||
$(LAS) -f $< -o $@ || \
|
$(LAS) -f $< -o $@ || \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user