| 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 # PNACL_BIN_PATH=<path> ... | 7 # PNACL_BIN_PATH=<path> ... |
| 8 # | 8 # |
| 9 | 9 |
| 10 # LLVM_SRC_PATH is the path to the root of the checked out source code. This | 10 # LLVM_SRC_PATH is the path to the root of the checked out source code. This |
| 11 # directory should contain the configure script, the include/ and lib/ | 11 # directory should contain the configure script, the include/ and lib/ |
| 12 # directories of LLVM, Clang in tools/clang/, etc. | 12 # directories of LLVM, Clang in tools/clang/, etc. |
| 13 # Alternatively, if you're building vs. a binary download of LLVM, then | 13 # Alternatively, if you're building vs. a binary download of LLVM, then |
| 14 # LLVM_SRC_PATH can point to the main untarred directory. | 14 # LLVM_SRC_PATH can point to the main untarred directory. |
| 15 LLVM_SRC_PATH ?= ../llvm | 15 LLVM_SRC_PATH ?= ../llvm |
| 16 | 16 |
| 17 # LLVM_BIN_PATH is the directory where binaries are placed by the LLVM build | 17 # LLVM_BIN_PATH is the directory where binaries are placed by the LLVM build |
| 18 # process. It should contain the tools like clang, clang-format, llc, | 18 # process. It should contain the tools like clang, clang-format, llc, |
| 19 # llvm-as, llvm-config, llvm-mc, pnacl-bcdis, and pnacl-freeze. | 19 # llvm-as, llvm-config, llvm-mc, pnacl-bcdis, and pnacl-freeze. |
| 20 ifdef CMAKE | 20 ifdef CMAKE |
| 21 # LLVM cmake build | 21 # LLVM cmake build |
| 22 LLVM_BIN_PATH ?= ../../out/llvm_x86_64_linux_work/bin | 22 LLVM_BIN_PATH ?= ../../out/llvm_x86_64_linux_work/bin |
| 23 STDLIB_FLAGS = | |
| 24 else | 23 else |
| 25 # LLVM autoconf build | 24 # LLVM autoconf build |
| 26 LLVM_BIN_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin | 25 LLVM_BIN_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin |
| 27 STDLIB_FLAGS = -stdlib=libc++ -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 | |
| 28 endif | 26 endif |
| 29 | 27 |
| 30 # The x86-32-specific sandboxed translator directory. | 28 # The x86-32-specific sandboxed translator directory. |
| 31 # It holds sandboxed versions of libraries and binaries. | 29 # It holds sandboxed versions of libraries and binaries. |
| 32 SB_LLVM_PATH ?= $(shell readlink -e \ | 30 SB_LLVM_PATH ?= $(shell readlink -e \ |
| 33 ../../out/sandboxed_translators_work/translator-i686/llvm-sb/Release) | 31 ../../out/sandboxed_translators_work/translator-i686/llvm-sb/Release) |
| 34 | 32 |
| 35 # NACL_ROOT is the root of the native client repository. | 33 # NACL_ROOT is the root of the native client repository. |
| 36 NACL_ROOT ?= $(shell python -c "import sys; sys.path.insert(0, 'pydir'); \ | 34 NACL_ROOT ?= $(shell python -c "import sys; sys.path.insert(0, 'pydir'); \ |
| 37 import utils; print utils.FindBaseNaCl()") | 35 import utils; print utils.FindBaseNaCl()") |
| 38 | 36 |
| 39 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. | 37 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. |
| 40 # This is used as the default root for finding binutils, libcxx, etc. | 38 # This is used as the default root for finding binutils, libcxx, etc. |
| 41 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e \ | 39 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e \ |
| 42 $(NACL_ROOT)/toolchain/linux_x86/pnacl_newlib) | 40 $(NACL_ROOT)/toolchain/linux_x86/pnacl_newlib) |
| 43 | 41 |
| 44 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.). | 42 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.). |
| 45 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin) | 43 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin) |
| 46 | 44 |
| 47 # CLANG_PATH is the location of the clang compiler to use for building | 45 # CLANG_PATH is the location of the clang compiler to use for building |
| 48 # the host binaries. | 46 # the host binaries. |
| 49 CLANG_PATH ?= $(shell readlink -e \ | 47 CLANG_PATH ?= $(shell readlink -e \ |
| 50 $(NACL_ROOT)/../third_party/llvm-build/Release+Asserts/bin) | 48 $(NACL_ROOT)/../third_party/llvm-build/Release+Asserts/bin) |
| 51 | 49 |
| 52 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should | 50 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should |
| 53 # contain header files and corresponding libraries. This is used for | 51 # contain header files and corresponding libraries. This is used for |
| 54 # building the host binaries in conjuction with clang. | 52 # building the host binaries in conjuction with clang. |
| 55 LIBCXX_INSTALL_PATH ?= $(PNACL_TOOLCHAIN_ROOT) | 53 LIBCXX_INSTALL_PATH ?= $(PNACL_TOOLCHAIN_ROOT) |
| 54 STDLIB_FLAGS := -stdlib=libc++ -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 |
| 56 | 55 |
| 57 HOST_ARCH ?= x86_64 | 56 HOST_ARCH ?= x86_64 |
| 58 ifeq ($(HOST_ARCH),x86_64) | 57 ifeq ($(HOST_ARCH),x86_64) |
| 59 HOST_FLAGS = -m64 | 58 HOST_FLAGS = -m64 |
| 60 else | 59 else |
| 61 ifeq ($(HOST_ARCH),x86) | 60 ifeq ($(HOST_ARCH),x86) |
| 62 HOST_FLAGS = -m32 | 61 HOST_FLAGS = -m32 |
| 63 endif | 62 endif |
| 64 endif | 63 endif |
| 65 | 64 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 bloat: make_symlink | 316 bloat: make_symlink |
| 318 nm -C -S -l pnacl-sz | \ | 317 nm -C -S -l pnacl-sz | \ |
| 319 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json | 318 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json |
| 320 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html | 319 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html |
| 321 | 320 |
| 322 clean: | 321 clean: |
| 323 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 322 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
| 324 | 323 |
| 325 clean-all: clean | 324 clean-all: clean |
| 326 rm -rf build/ | 325 rm -rf build/ |
| OLD | NEW |