llvm.org GIT mirror llvm / bb3dd47
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8164 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 10 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
353353 # Allow gnu extensions...
354354 CPPFLAGS += -D_GNU_SOURCE
355355
356 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
357 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
356 CompileWarnings := -Wall -W -Wwrite-strings -Wno-unused
357 CompileCommonOpts := $(CompileWarnings) -I$(LEVEL)/include -fshort-enums
358 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions
358359
359360 #
360361 # Compile commands with libtool.
738739
739740 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1XX)
740741 @echo "Compiling $< to bytecode"
741 $(VERB) $(LLVMGXX) $(CPPFLAGS) -c $< -o $@
742 $(VERB) $(LLVMGXX) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
742743
743744 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1)
744745 @echo "Compiling $< to bytecode"
745 $(VERB) $(LLVMGCC) $(CPPFLAGS) -c $< -o $@
746 $(VERB) $(LLVMGCC) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
746747
747748 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.ll $(BUILD_OBJ_DIR)/Bytecode/.dir $(LLVMAS)
748749 @echo "Compiling $< to bytecode"
353353 # Allow gnu extensions...
354354 CPPFLAGS += -D_GNU_SOURCE
355355
356 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
357 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
356 CompileWarnings := -Wall -W -Wwrite-strings -Wno-unused
357 CompileCommonOpts := $(CompileWarnings) -I$(LEVEL)/include -fshort-enums
358 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions
358359
359360 #
360361 # Compile commands with libtool.
738739
739740 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1XX)
740741 @echo "Compiling $< to bytecode"
741 $(VERB) $(LLVMGXX) $(CPPFLAGS) -c $< -o $@
742 $(VERB) $(LLVMGXX) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
742743
743744 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1)
744745 @echo "Compiling $< to bytecode"
745 $(VERB) $(LLVMGCC) $(CPPFLAGS) -c $< -o $@
746 $(VERB) $(LLVMGCC) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
746747
747748 $(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.ll $(BUILD_OBJ_DIR)/Bytecode/.dir $(LLVMAS)
748749 @echo "Compiling $< to bytecode"