aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-03 21:01:45 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-03 21:01:45 +0000
commite46687c14b5cf2b1b9b8835c3ec54d23df02408d (patch)
treed8877273fb06d35dbfbf0ef074219be52e6551c4 /Makefile.rules
parent9f132765a2d8277f8cc4a4053542b19940862aad (diff)
downloadexternal_llvm-e46687c14b5cf2b1b9b8835c3ec54d23df02408d.zip
external_llvm-e46687c14b5cf2b1b9b8835c3ec54d23df02408d.tar.gz
external_llvm-e46687c14b5cf2b1b9b8835c3ec54d23df02408d.tar.bz2
Handle upgrade of llvm-gcc3 assembly files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index f80cc25..6357856 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -320,6 +320,18 @@ endif
ifndef LBUGPOINT
LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT)
endif
+ifndef LUPGRADE
+LUPGRADE := $(LLVMToolDir)/llvm-upgrade$(EXEEXT)
+endif
+ifeq ($(LLVMGCC_MAJVERS),3)
+UPGRADE_MSG = $(Echo) "Upgrading $(1) assembly to latest."
+UPGRADE_LL = $(Verb)$(LUPGRADE) $(1) -o $(1).up.tmp -f ; $(MV) $(1).up.tmp $(1)
+else
+UPGRADE_MSG =
+UPGRADE_LL =
+endif
+
+LLVMGCC_MAJVERS := 4
LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC)
LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX)
@@ -1028,6 +1040,8 @@ $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
$< -o $@ -S -emit-llvm ; \
then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
+ $(call UPGRADE_MSG,$@)
+ $(call UPGRADE_LL,$@)
$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
$(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
@@ -1035,6 +1049,8 @@ $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
$< -o $@ -S -emit-llvm ; \
then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
+ $(call UPGRADE_MSG,$@)
+ $(call UPGRADE_LL,$@)
$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
@@ -1042,6 +1058,8 @@ $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
$< -o $@ -S -emit-llvm ; \
then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
+ $(call UPGRADE_MSG,$@)
+ $(call UPGRADE_LL,$@)
# Provide alternate rule sets if dependencies are disabled
else
@@ -1061,14 +1079,20 @@ $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
$(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
$(BCCompile.CXX) $< -o $@ -S -emit-llvm
+ $(call UPGRADE_MSG,$@)
+ $(call UPGRADE_LL,$@)
$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
$(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
$(BCCompile.CXX) $< -o $@ -S -emit-llvm
+ $(call UPGRADE_MSG,$@)
+ $(call UPGRADE_LL,$@)
$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
$(BCCompile.C) $< -o $@ -S -emit-llvm
+ $(call UPGRADE_MSG,@)
+ $(call UPGRADE_LL,@)
endif