OLD | NEW |
1 # The following variables will likely need to be modified, depending on where | 1 # The following variables will likely need to be modified, depending on where |
2 # and how you built LLVM & Clang. They can be overridden in a command-line | 2 # and how you built LLVM & Clang. They can be overridden in a command-line |
3 # invocation of make, like: | 3 # invocation of make, like: |
4 # | 4 # |
5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> \ | 5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> \ |
6 # LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> ... | 6 # LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> ... |
7 # | 7 # |
8 | 8 |
9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This | 9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This |
10 # directory should contain the configure script, the include/ and lib/ | 10 # directory should contain the configure script, the include/ and lib/ |
(...skipping 24 matching lines...) Expand all Loading... |
35 ifeq ($(HOST_ARCH),x86) | 35 ifeq ($(HOST_ARCH),x86) |
36 HOST_FLAGS = -m32 -stdlib=libc++ | 36 HOST_FLAGS = -m32 -stdlib=libc++ |
37 endif | 37 endif |
38 endif | 38 endif |
39 | 39 |
40 ifdef DEBUG | 40 ifdef DEBUG |
41 OBJDIR = build/Debug | 41 OBJDIR = build/Debug |
42 OPTLEVEL = -O0 | 42 OPTLEVEL = -O0 |
43 else | 43 else |
44 OBJDIR = build/Release | 44 OBJDIR = build/Release |
45 OPTLEVEL = -O2 | 45 OPTLEVEL = -O2 -ffunction-sections -fdata-sections |
46 endif | 46 endif |
47 | 47 |
48 # The list of CXX defines that are dependent on build parameters. | 48 # The list of CXX defines that are dependent on build parameters. |
49 CXX_DEFINES = | 49 CXX_DEFINES = |
50 | 50 |
51 ifdef MINIMAL | 51 ifdef MINIMAL |
52 NOASSERT = 1 | 52 NOASSERT = 1 |
53 OBJDIR := $(OBJDIR)+Min | 53 OBJDIR := $(OBJDIR)+Min |
54 CXX_DEFINES += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \ | 54 CXX_DEFINES += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \ |
55 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0 | 55 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0 |
(...skipping 23 matching lines...) Expand all Loading... |
79 `$(LLVM_BIN_PATH)/llvm-config --system-libs` | 79 `$(LLVM_BIN_PATH)/llvm-config --system-libs` |
80 | 80 |
81 # It's recommended that CXX matches the compiler you used to build LLVM itself. | 81 # It's recommended that CXX matches the compiler you used to build LLVM itself. |
82 CCACHE := `command -v ccache` | 82 CCACHE := `command -v ccache` |
83 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ | 83 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ |
84 | 84 |
85 CXXFLAGS := $(LLVM_CXXFLAGS) -std=c++11 -Wall -Wextra -Werror -fno-rtti \ | 85 CXXFLAGS := $(LLVM_CXXFLAGS) -std=c++11 -Wall -Wextra -Werror -fno-rtti \ |
86 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) $(CXX_DEFINES) -g \ | 86 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) $(CXX_DEFINES) -g \ |
87 $(HOST_FLAGS) -Wno-error=unused-parameter \ | 87 $(HOST_FLAGS) -Wno-error=unused-parameter \ |
88 -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 | 88 -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 |
89 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib | 89 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections |
90 | 90 |
91 SRCS = \ | 91 SRCS = \ |
92 assembler.cpp \ | 92 assembler.cpp \ |
93 assembler_ia32.cpp \ | 93 assembler_ia32.cpp \ |
94 IceCfg.cpp \ | 94 IceCfg.cpp \ |
95 IceCfgNode.cpp \ | 95 IceCfgNode.cpp \ |
96 IceELFObjectWriter.cpp \ | 96 IceELFObjectWriter.cpp \ |
97 IceELFSection.cpp \ | 97 IceELFSection.cpp \ |
98 IceGlobalContext.cpp \ | 98 IceGlobalContext.cpp \ |
99 IceGlobalInits.cpp \ | 99 IceGlobalInits.cpp \ |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 endif | 202 endif |
203 format-diff: | 203 format-diff: |
204 git diff -U0 `git merge-base HEAD master` | \ | 204 git diff -U0 `git merge-base HEAD master` | \ |
205 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i | 205 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i |
206 | 206 |
207 clean: | 207 clean: |
208 rm -rf llvm2ice *.o $(OBJDIR) | 208 rm -rf llvm2ice *.o $(OBJDIR) |
209 | 209 |
210 clean-all: clean | 210 clean-all: clean |
211 rm -rf build/ | 211 rm -rf build/ |
OLD | NEW |