[llvm-commits] CVS: llvm/Makefile.common

Chris Lattner lattner at cs.uiuc.edu
Wed Aug 27 13:27:01 PDT 2003


Changes in directory llvm:

Makefile.common updated: 1.128 -> 1.129

---
Log message:

Refactor code slightly.  Make code compiled with llvmgcc use the warning options 
as well.  Compile with -fshort-enums whether in debug or release mode, because it breaks the ABI


---
Diffs of the changes:

Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.128 llvm/Makefile.common:1.129
--- llvm/Makefile.common:1.128	Sat Aug 23 10:56:38 2003
+++ llvm/Makefile.common	Wed Aug 27 13:26:44 2003
@@ -354,8 +354,9 @@
 # Allow gnu extensions...
 CPPFLAGS += -D_GNU_SOURCE
 
-CompileCommonOpts := -Wall -W  -Wwrite-strings -Wno-unused -I$(LEVEL)/include
-CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
+CompileWarnings  := -Wall -W  -Wwrite-strings -Wno-unused
+CompileCommonOpts := $(CompileWarnings) -I$(LEVEL)/include -fshort-enums
+CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions
 
 #
 # Compile commands with libtool.
@@ -739,11 +740,11 @@
 
 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1XX)
 	@echo "Compiling $< to bytecode"
-	$(VERB) $(LLVMGXX) $(CPPFLAGS) -c $< -o $@
+	$(VERB) $(LLVMGXX) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
 
 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1)
 	@echo "Compiling $< to bytecode"
-	$(VERB) $(LLVMGCC) $(CPPFLAGS) -c $< -o $@
+	$(VERB) $(LLVMGCC) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
 
 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.ll $(BUILD_OBJ_DIR)/Bytecode/.dir $(LLVMAS)
 	@echo "Compiling $< to bytecode"





More information about the llvm-commits mailing list