diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-27 18:26:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-27 18:26:44 +0000 |
commit | bb3dd47d8f8496c0ee0e2bd257826e23a21e973a (patch) | |
tree | 564963f8ccf113595599b69e3f12730637cff107 | |
parent | 88d942d8983aadecae477fee523c23312d194515 (diff) | |
download | llvm-bb3dd47d8f8496c0ee0e2bd257826e23a21e973a.tar.gz llvm-bb3dd47d8f8496c0ee0e2bd257826e23a21e973a.tar.bz2 llvm-bb3dd47d8f8496c0ee0e2bd257826e23a21e973a.tar.xz |
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
-rw-r--r-- | Makefile.common | 9 | ||||
-rw-r--r-- | Makefile.rules | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Makefile.common b/Makefile.common index 9f0c523735..7b6c9867d8 100644 --- a/Makefile.common +++ b/Makefile.common @@ -354,8 +354,9 @@ endif # 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)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir $(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" diff --git a/Makefile.rules b/Makefile.rules index 9f0c523735..7b6c9867d8 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -354,8 +354,9 @@ endif # 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)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir $(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" |