summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-21 21:01:20 +0000
committerChris Lattner <sabre@nondot.org>2006-06-21 21:01:20 +0000
commit8eb12def01ac68fecdff615c35d80ea293c94741 (patch)
tree5574b5bdb90db3ae69a5434c7d04d5c2f8f798f1 /Makefile.rules
parentd92490fbcb3648ca13bcd0540ed071fe7ac32d6c (diff)
downloadllvm-8eb12def01ac68fecdff615c35d80ea293c94741.tar.gz
llvm-8eb12def01ac68fecdff615c35d80ea293c94741.tar.bz2
llvm-8eb12def01ac68fecdff615c35d80ea293c94741.tar.xz
Add targets for generating .s file in addition to .o files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules43
1 files changed, 28 insertions, 15 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 7a8fce7627..16c5b43eef 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1015,21 +1015,6 @@ $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
-
-## Rules for building preprocessed (.i/.ii) outputs.
-$(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
- $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
- $(Verb) $(Preprocess.CXX) $< -o $@
-
-$(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
- $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
- $(Verb) $(Preprocess.CXX) $< -o $@
-
- $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
- $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
- $(Verb) $(Preprocess.C) $< -o $@
-
-
#---------------------------------------------------------
# Create .bc files in the ObjDir directory from .cpp .cc and .c files...
#---------------------------------------------------------
@@ -1084,6 +1069,34 @@ $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
endif
+
+## Rules for building preprocessed (.i/.ii) outputs.
+$(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
+ $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
+ $(Verb) $(Preprocess.CXX) $< -o $@
+
+$(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
+ $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
+ $(Verb) $(Preprocess.CXX) $< -o $@
+
+ $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
+ $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
+ $(Verb) $(Preprocess.C) $< -o $@
+
+
+$(ObjDir)/%.s: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
+ $(Echo) "Compiling $*.cpp to asm for $(BuildMode) build" $(PIC_FLAG)
+ $(MAYBE_PIC_Compile.CXX) $< -o $@ -S
+
+$(ObjDir)/%.s: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
+ $(Echo) "Compiling $*.cc to asm for $(BuildMode) build" $(PIC_FLAG)
+ $(MAYBE_PIC_Compile.CXX) $< -o $@ -S
+
+$(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
+ $(Echo) "Compiling $*.c to asm for $(BuildMode) build" $(PIC_FLAG)
+ $(MAYBE_PIC_Compile.C) $< -o $@ -S
+
+
# make the C and C++ compilers strip debug info out of bytecode libraries.
ifdef DEBUG_RUNTIME
$(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)