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 10 matching lines...) Expand all Loading... | |
21 | 21 |
22 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should | 22 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should |
23 # contain header files and corresponding libraries | 23 # contain header files and corresponding libraries |
24 LIBCXX_INSTALL_PATH ?= $(shell readlink -e \ | 24 LIBCXX_INSTALL_PATH ?= $(shell readlink -e \ |
25 ../../../toolchain/linux_x86/pnacl_newlib) | 25 ../../../toolchain/linux_x86/pnacl_newlib) |
26 | 26 |
27 # CLANG_PATH is the location of the clang compiler to use. | 27 # CLANG_PATH is the location of the clang compiler to use. |
28 CLANG_PATH ?= $(shell readlink -e \ | 28 CLANG_PATH ?= $(shell readlink -e \ |
29 ../../../../third_party/llvm-build/Release+Asserts/bin) | 29 ../../../../third_party/llvm-build/Release+Asserts/bin) |
30 | 30 |
31 # The location of binutils tools (e.g., objdump). | |
32 BINUTILS_BIN_PATH ?= $(shell readlink -e \ | |
33 ../../out/binutils_pnacl_x86_64_linux_install/bin) | |
Karl
2015/02/16 18:50:13
Why is this different than other lines suchas LLVM
jvoung (off chromium)
2015/02/17 22:17:04
Okay making it the work directory too (I originall
| |
34 | |
31 HOST_ARCH ?= x86_64 | 35 HOST_ARCH ?= x86_64 |
32 ifeq ($(HOST_ARCH),x86_64) | 36 ifeq ($(HOST_ARCH),x86_64) |
33 HOST_FLAGS = -m64 -stdlib=libc++ | 37 HOST_FLAGS = -m64 -stdlib=libc++ |
34 else | 38 else |
35 ifeq ($(HOST_ARCH),x86) | 39 ifeq ($(HOST_ARCH),x86) |
36 HOST_FLAGS = -m32 -stdlib=libc++ | 40 HOST_FLAGS = -m32 -stdlib=libc++ |
37 endif | 41 endif |
38 endif | 42 endif |
39 | 43 |
40 ifdef DEBUG | 44 ifdef DEBUG |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 OBJDIR := $(OBJDIR)+TSan | 77 OBJDIR := $(OBJDIR)+TSan |
74 CXX_EXTRA += -fsanitize=thread | 78 CXX_EXTRA += -fsanitize=thread |
75 LD_EXTRA += -fsanitize=thread | 79 LD_EXTRA += -fsanitize=thread |
76 endif | 80 endif |
77 | 81 |
78 $(info -----------------------------------------------) | 82 $(info -----------------------------------------------) |
79 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) | 83 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) |
80 $(info Using LLVM_BIN_PATH = $(LLVM_BIN_PATH)) | 84 $(info Using LLVM_BIN_PATH = $(LLVM_BIN_PATH)) |
81 $(info Using LIBCXX_INSTALL_PATH = $(LIBCXX_INSTALL_PATH)) | 85 $(info Using LIBCXX_INSTALL_PATH = $(LIBCXX_INSTALL_PATH)) |
82 $(info Using CLANG_PATH = $(CLANG_PATH)) | 86 $(info Using CLANG_PATH = $(CLANG_PATH)) |
87 $(info Using BINUTILS_BIN_PATH = $(BINUTILS_BIN_PATH)) | |
83 $(info Using HOST_ARCH = $(HOST_ARCH)) | 88 $(info Using HOST_ARCH = $(HOST_ARCH)) |
84 $(info -----------------------------------------------) | 89 $(info -----------------------------------------------) |
85 | 90 |
86 LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags` | 91 LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags` |
87 LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --libs` \ | 92 LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --libs` \ |
88 `$(LLVM_BIN_PATH)/llvm-config --ldflags` \ | 93 `$(LLVM_BIN_PATH)/llvm-config --ldflags` \ |
89 `$(LLVM_BIN_PATH)/llvm-config --system-libs` | 94 `$(LLVM_BIN_PATH)/llvm-config --system-libs` |
90 | 95 |
91 # It's recommended that CXX matches the compiler you used to build LLVM itself. | 96 # It's recommended that CXX matches the compiler you used to build LLVM itself. |
92 CCACHE := `command -v ccache` | 97 CCACHE := `command -v ccache` |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 $(UNITTEST_OBJS): | $(OBJDIR)/unittest | 186 $(UNITTEST_OBJS): | $(OBJDIR)/unittest |
182 | 187 |
183 $(OBJDIR): | 188 $(OBJDIR): |
184 @mkdir -p $@ | 189 @mkdir -p $@ |
185 | 190 |
186 $(OBJDIR)/unittest: $(OBJDIR) | 191 $(OBJDIR)/unittest: $(OBJDIR) |
187 @mkdir -p $@ | 192 @mkdir -p $@ |
188 | 193 |
189 check-lit: $(OBJDIR)/llvm2ice make_symlink | 194 check-lit: $(OBJDIR)/llvm2ice make_symlink |
190 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \ | 195 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \ |
196 BINUTILS_BIN_PATH=$(BINUTILS_BIN_PATH) \ | |
191 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit | 197 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit |
192 | 198 |
193 check-unit: $(OBJDIR)/run_unittests | 199 check-unit: $(OBJDIR)/run_unittests |
194 $(OBJDIR)/run_unittests | 200 $(OBJDIR)/run_unittests |
195 | 201 |
196 ifdef MINIMAL | 202 ifdef MINIMAL |
197 check: check-lit check-unit | 203 check: check-lit check-unit |
198 @echo "Crosstests ignored, minimal build" | 204 @echo "Crosstests ignored, minimal build" |
199 else | 205 else |
200 check: check-lit check-unit | 206 check: check-lit check-unit |
(...skipping 16 matching lines...) Expand all Loading... | |
217 bloat: make_symlink | 223 bloat: make_symlink |
218 nm -C -S -l llvm2ice | \ | 224 nm -C -S -l llvm2ice | \ |
219 bloat/bloat.py --nm-output=/dev/stdin syms > build/llvm2ice.bloat.json | 225 bloat/bloat.py --nm-output=/dev/stdin syms > build/llvm2ice.bloat.json |
220 @echo See Subzero size breakdown in bloat/llvm2ice.bloat.html | 226 @echo See Subzero size breakdown in bloat/llvm2ice.bloat.html |
221 | 227 |
222 clean: | 228 clean: |
223 rm -rf llvm2ice *.o $(OBJDIR) build/llvm2ice.bloat.json | 229 rm -rf llvm2ice *.o $(OBJDIR) build/llvm2ice.bloat.json |
224 | 230 |
225 clean-all: clean | 231 clean-all: clean |
226 rm -rf build/ | 232 rm -rf build/ |
OLD | NEW |