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> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \ | 5 # make LLVM_SRC_PATH=<path> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \ |
6 # PNACL_BIN_PATH=<path> ... | 6 # PNACL_BIN_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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 `$(PNACL_BIN_PATH)/llvm-config --ldflags` \ | 152 `$(PNACL_BIN_PATH)/llvm-config --ldflags` \ |
153 `$(PNACL_BIN_PATH)/llvm-config --system-libs` | 153 `$(PNACL_BIN_PATH)/llvm-config --system-libs` |
154 SB_LLVM_LDFLAGS := $(LLVM_LIBS_LIST) \ | 154 SB_LLVM_LDFLAGS := $(LLVM_LIBS_LIST) \ |
155 -L$(SB_LLVM_PATH)/lib | 155 -L$(SB_LLVM_PATH)/lib |
156 | 156 |
157 CCACHE := `command -v ccache` | 157 CCACHE := `command -v ccache` |
158 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ | 158 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ |
159 SB_CXX := CCACHE_CPP2=yes $(CCACHE) $(PNACL_BIN_PATH)/pnacl-clang++ | 159 SB_CXX := CCACHE_CPP2=yes $(CCACHE) $(PNACL_BIN_PATH)/pnacl-clang++ |
160 SB_TRANSLATE := $(PNACL_BIN_PATH)/pnacl-translate | 160 SB_TRANSLATE := $(PNACL_BIN_PATH)/pnacl-translate |
161 | 161 |
| 162 # Extra warnings that LLVM's build system adds in addition to -Wall. |
| 163 LLVM_EXTRA_WARNINGS := -Wcovered-switch-default |
| 164 |
162 BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \ | 165 BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \ |
163 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ | 166 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ |
164 » $(CXX_EXTRA) | 167 » $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA) |
165 | 168 |
166 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ | 169 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ |
167 $(STDLIB_FLAGS) | 170 $(STDLIB_FLAGS) |
168 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(SB_CXX_DEFINES) | 171 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(SB_CXX_DEFINES) |
169 | 172 |
170 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ | 173 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ |
171 $(LD_EXTRA) $(STDLIB_FLAGS) | 174 $(LD_EXTRA) $(STDLIB_FLAGS) |
172 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. | 175 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. |
173 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) | 176 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) |
174 | 177 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 381 |
379 docs: | 382 docs: |
380 doxygen Doxyfile | 383 doxygen Doxyfile |
381 @echo See file://`pwd`/docs/html/index.html | 384 @echo See file://`pwd`/docs/html/index.html |
382 | 385 |
383 clean: | 386 clean: |
384 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 387 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
385 | 388 |
386 clean-all: clean | 389 clean-all: clean |
387 rm -rf build/ docs/ | 390 rm -rf build/ docs/ |
OLD | NEW |