Chromium Code Reviews| 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/ |
| 11 # directories of LLVM, Clang in tools/clang/, etc. | 11 # directories of LLVM, Clang in tools/clang/, etc. |
| 12 # Alternatively, if you're building vs. a binary download of LLVM, then | 12 # Alternatively, if you're building vs. a binary download of LLVM, then |
| 13 # LLVM_SRC_PATH can point to the main untarred directory. | 13 # LLVM_SRC_PATH can point to the main untarred directory. |
| 14 LLVM_SRC_PATH ?= ../llvm | 14 LLVM_SRC_PATH ?= ../llvm |
| 15 | 15 |
| 16 # The x86-32-specific sandboxed translator directory. | 16 # The x86-32-specific sandboxed translator directory. |
| 17 # It holds sandboxed versions of libraries and binaries. | 17 # It holds sandboxed versions of libraries and binaries. |
| 18 SB_LLVM_PATH ?= $(shell readlink -e \ | 18 SB_LLVM_PATH ?= $(shell readlink -e \ |
| 19 ../../out/sandboxed_translators_work/translator-i686/llvm-sb/Release) | 19 ../../out/sandboxed_translators_work/translator-i686/llvm-sb/Release) |
| 20 | 20 |
| 21 # NACL_ROOT is the root of the native client repository. | 21 # NACL_ROOT is the root of the native client repository. |
| 22 NACL_ROOT ?= $(shell python -c "import sys; sys.path.insert(0, 'pydir'); \ | 22 NACL_ROOT ?= $(shell python -c "import sys; sys.path.insert(0, 'pydir'); \ |
| 23 import utils; print utils.FindBaseNaCl()") | 23 import utils; print utils.FindBaseNaCl()") |
| 24 | 24 |
| 25 # TOOLCHAIN_ROOT is the location of NaCl/PNaCl toolchains and other | |
| 26 # tools like qemu. | |
| 27 TOOLCHAIN_ROOT ?= $(shell readlink -e $(NACL_ROOT)/toolchain/linux_x86) | |
| 28 | |
| 25 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. | 29 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. |
| 26 # This is used as the default root for finding binutils, libcxx, etc. | 30 # This is used as the default root for finding binutils, libcxx, etc. |
| 27 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e \ | 31 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e $(TOOLCHAIN_ROOT)/pnacl_newlib_raw) |
| 28 » $(NACL_ROOT)/toolchain/linux_x86/pnacl_newlib_raw) | |
| 29 | 32 |
| 30 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.). | 33 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.). |
| 31 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin) | 34 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin) |
| 32 | 35 |
| 33 # Hack to auto-detect autoconf versus cmake build of LLVM. If the LLVM tools | 36 # Hack to auto-detect autoconf versus cmake build of LLVM. If the LLVM tools |
| 34 # were dynamically linked with something like libLLVM-3.7svn.so, it is an | 37 # 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 | 38 # autoconf build, otherwise it is a cmake build. AUTOCONF is set to 0 for |
| 36 # cmake, nonzero for autoconf. | 39 # cmake, nonzero for autoconf. |
| 37 AUTOCONF ?= $(shell ldd $(PNACL_BIN_PATH)/opt | grep -c libLLVM-) | 40 AUTOCONF ?= $(shell ldd $(PNACL_BIN_PATH)/opt | grep -c libLLVM-) |
| 38 | 41 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 CXX_EXTRA += -fsanitize=thread | 101 CXX_EXTRA += -fsanitize=thread |
| 99 LD_EXTRA += -fsanitize=thread | 102 LD_EXTRA += -fsanitize=thread |
| 100 endif | 103 endif |
| 101 | 104 |
| 102 SB_OBJDIR := $(OBJDIR)+Sandboxed | 105 SB_OBJDIR := $(OBJDIR)+Sandboxed |
| 103 | 106 |
| 104 $(info -----------------------------------------------) | 107 $(info -----------------------------------------------) |
| 105 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) | 108 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) |
| 106 $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH)) | 109 $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH)) |
| 107 $(info Using NACL_ROOT = $(NACL_ROOT)) | 110 $(info Using NACL_ROOT = $(NACL_ROOT)) |
| 111 $(info Using TOOLCHAIN_ROOT = $(TOOLCHAIN_ROOT)) | |
| 108 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT)) | 112 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT)) |
| 109 $(info Using PNACL_BIN_PATH = $(PNACL_BIN_PATH)) | 113 $(info Using PNACL_BIN_PATH = $(PNACL_BIN_PATH)) |
| 110 $(info Using CLANG_PATH = $(CLANG_PATH)) | 114 $(info Using CLANG_PATH = $(CLANG_PATH)) |
| 111 $(info Using LIBCXX_INSTALL_PATH = $(LIBCXX_INSTALL_PATH)) | 115 $(info Using LIBCXX_INSTALL_PATH = $(LIBCXX_INSTALL_PATH)) |
| 112 $(info Using HOST_ARCH = $(HOST_ARCH)) | 116 $(info Using HOST_ARCH = $(HOST_ARCH)) |
| 113 $(info -----------------------------------------------) | 117 $(info -----------------------------------------------) |
| 114 | 118 |
| 115 LLVM_CXXFLAGS := `$(PNACL_BIN_PATH)/llvm-config --cxxflags` | 119 LLVM_CXXFLAGS := `$(PNACL_BIN_PATH)/llvm-config --cxxflags` |
| 116 SB_LLVM_CXXFLAGS := $(LLVM_CXXFLAGS) | 120 SB_LLVM_CXXFLAGS := $(LLVM_CXXFLAGS) |
| 117 | 121 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit | 300 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit |
| 297 | 301 |
| 298 ifdef MINIMAL | 302 ifdef MINIMAL |
| 299 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime | 303 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime |
| 300 @echo "Crosstests disabled, minimal build" | 304 @echo "Crosstests disabled, minimal build" |
| 301 else | 305 else |
| 302 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime | 306 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime |
| 303 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. | 307 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. |
| 304 # For (slow) sandboxed tests, limit to Om1/sse4.1. | 308 # For (slow) sandboxed tests, limit to Om1/sse4.1. |
| 305 ./pydir/crosstest_generator.py -v --lit \ | 309 ./pydir/crosstest_generator.py -v --lit \ |
| 306 » -i native,sse2 -i native,sse4.1,test_vector_ops \ | 310 » » --toolchain-root $(TOOLCHAIN_ROOT) \ |
|
Jim Stichnoth
2015/06/17 01:14:10
line this up with the lines below
jvoung (off chromium)
2015/06/17 17:07:53
Done.
| |
| 307 » -i sandbox,sse4.1,Om1 | 311 » -i x8632,native,sse2 -i x8632,native,sse4.1,test_vector_ops \ |
| 312 » -i x8632,sandbox,sse4.1,Om1 \ | |
| 313 » -i arm32,native,neon,Om1,simple_loop | |
| 308 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ | 314 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ |
| 309 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv crosstest/Output | 315 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv crosstest/Output |
| 310 endif | 316 endif |
| 311 | 317 |
| 312 check-unit: $(OBJDIR)/run_unittests | 318 check-unit: $(OBJDIR)/run_unittests |
| 313 $(OBJDIR)/run_unittests | 319 $(OBJDIR)/run_unittests |
| 314 | 320 |
| 315 check: check-lit check-unit check-xtest | 321 check: check-lit check-unit check-xtest |
| 316 | 322 |
| 317 FORMAT_BLACKLIST = | 323 FORMAT_BLACKLIST = |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 330 bloat: make_symlink | 336 bloat: make_symlink |
| 331 nm -C -S -l pnacl-sz | \ | 337 nm -C -S -l pnacl-sz | \ |
| 332 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json | 338 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json |
| 333 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html | 339 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html |
| 334 | 340 |
| 335 clean: | 341 clean: |
| 336 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 342 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
| 337 | 343 |
| 338 clean-all: clean | 344 clean-all: clean |
| 339 rm -rf build/ | 345 rm -rf build/ |
| OLD | NEW |