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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. | 25 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. |
26 # This is used as the default root for finding binutils, libcxx, etc. | 26 # This is used as the default root for finding binutils, libcxx, etc. |
27 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e \ | 27 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e \ |
28 $(NACL_ROOT)/toolchain/linux_x86/pnacl_newlib_raw) | 28 $(NACL_ROOT)/toolchain/linux_x86/pnacl_newlib_raw) |
29 | 29 |
30 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.). | 30 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.). |
31 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin) | 31 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin) |
32 | 32 |
33 # Hack to auto-detect autoconf versus cmake build of LLVM. If the LLVM tools | 33 # Hack to auto-detect autoconf versus cmake build of LLVM. If the LLVM tools |
34 # were dynamically linked with something like libLLVM-3.6svn.so, it is an | 34 # were dynamically linked with something like libLLVM-3.7svn.so, it is an |
35 # autoconf build, otherwise it is a cmake build. AUTOCONF is set to 0 for | 35 # autoconf build, otherwise it is a cmake build. AUTOCONF is set to 0 for |
36 # cmake, nonzero for autoconf. | 36 # cmake, nonzero for autoconf. |
37 AUTOCONF ?= $(shell ldd $(PNACL_BIN_PATH)/opt | grep -c libLLVM-) | 37 AUTOCONF ?= $(shell ldd $(PNACL_BIN_PATH)/opt | grep -c libLLVM-) |
38 | 38 |
39 # CLANG_PATH is the location of the clang compiler to use for building | 39 # CLANG_PATH is the location of the clang compiler to use for building |
40 # the host binaries. | 40 # the host binaries. |
41 CLANG_PATH ?= $(shell readlink -e \ | 41 CLANG_PATH ?= $(shell readlink -e \ |
42 $(NACL_ROOT)/../third_party/llvm-build/Release+Asserts/bin) | 42 $(NACL_ROOT)/../third_party/llvm-build/Release+Asserts/bin) |
43 | 43 |
44 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should | 44 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 ifeq ($(AUTOCONF), 0) | 127 ifeq ($(AUTOCONF), 0) |
128 # LLVM cmake build | 128 # LLVM cmake build |
129 LLVM_LIBS := $(LLVM_LIBS_LIST) | 129 LLVM_LIBS := $(LLVM_LIBS_LIST) |
130 # For the cmake build, the gtest libs end up in the same place as the LLVM | 130 # For the cmake build, the gtest libs end up in the same place as the LLVM |
131 # libs, so no "-L..." arg is needed. | 131 # libs, so no "-L..." arg is needed. |
132 GTEST_LIB_PATH ?= | 132 GTEST_LIB_PATH ?= |
133 CLANG_FORMAT_PATH ?= $(PNACL_BIN_PATH) | 133 CLANG_FORMAT_PATH ?= $(PNACL_BIN_PATH) |
134 else | 134 else |
135 # LLVM autoconf build | 135 # LLVM autoconf build |
136 LLVM_LIBS := -lLLVM-3.6svn | 136 LLVM_LIBS := -lLLVM-3.7svn |
137 GTEST_LIB_PATH ?= -L../../out/llvm_x86_64_linux_work/Release+Asserts/lib | 137 GTEST_LIB_PATH ?= -L../../out/llvm_x86_64_linux_work/Release+Asserts/lib |
138 CLANG_FORMAT_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin | 138 CLANG_FORMAT_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin |
139 endif | 139 endif |
140 | 140 |
141 LLVM_LDFLAGS := $(LLVM_LIBS) \ | 141 LLVM_LDFLAGS := $(LLVM_LIBS) \ |
142 `$(PNACL_BIN_PATH)/llvm-config --ldflags` \ | 142 `$(PNACL_BIN_PATH)/llvm-config --ldflags` \ |
143 `$(PNACL_BIN_PATH)/llvm-config --system-libs` | 143 `$(PNACL_BIN_PATH)/llvm-config --system-libs` |
144 SB_LLVM_LDFLAGS := $(LLVM_LIBS_LIST) \ | 144 SB_LLVM_LDFLAGS := $(LLVM_LIBS_LIST) \ |
145 -L$(SB_LLVM_PATH)/lib | 145 -L$(SB_LLVM_PATH)/lib |
146 | 146 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 bloat: make_symlink | 327 bloat: make_symlink |
328 nm -C -S -l pnacl-sz | \ | 328 nm -C -S -l pnacl-sz | \ |
329 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json | 329 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json |
330 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html | 330 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html |
331 | 331 |
332 clean: | 332 clean: |
333 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 333 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
334 | 334 |
335 clean-all: clean | 335 clean-all: clean |
336 rm -rf build/ | 336 rm -rf build/ |
OLD | NEW |