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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 LD_EXTRA += -fsanitize=address | 131 LD_EXTRA += -fsanitize=address |
132 endif | 132 endif |
133 | 133 |
134 ifdef MSAN | 134 ifdef MSAN |
135 # TODO(ascull): this has an as yet undiagnosed uninitialized memory access | 135 # TODO(ascull): this has an as yet undiagnosed uninitialized memory access |
136 OBJDIR := $(OBJDIR)+MSan | 136 OBJDIR := $(OBJDIR)+MSan |
137 CXX_EXTRA += -fsanitize=memory | 137 CXX_EXTRA += -fsanitize=memory |
138 LD_EXTRA += -fsanitize=memory | 138 LD_EXTRA += -fsanitize=memory |
139 endif | 139 endif |
140 | 140 |
141 ifdef FORCEASM | |
142 FORCEASM_FLAG = --filetype=asm | |
143 # With --filetype=asm and --sandbox, the llvm-mc assembler emits the lock and | |
144 # 16-bit prefixes in the "wrong" order, causing the validator to reject the | |
145 # resulting nexe. So we just disable those tests for now. | |
146 FORCEASM_XTEST_EXCLUDES = -e x8632,sandbox,test_sync_atomic | |
147 FORCEASM_LIT_PARAM = --param=FORCEASM | |
148 else | |
149 FORCEASM_FLAG = | |
150 FORCEASM_XTEST_EXCLUDES = | |
151 FORCEASM_LIT_PARAM = | |
152 endif | |
153 | |
141 SB_OBJDIR := $(OBJDIR)+Sandboxed | 154 SB_OBJDIR := $(OBJDIR)+Sandboxed |
142 | 155 |
143 $(info -----------------------------------------------) | 156 $(info -----------------------------------------------) |
144 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) | 157 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) |
145 $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH)) | 158 $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH)) |
146 $(info Using NACL_ROOT = $(NACL_ROOT)) | 159 $(info Using NACL_ROOT = $(NACL_ROOT)) |
147 $(info Using TOOLCHAIN_ROOT = $(TOOLCHAIN_ROOT)) | 160 $(info Using TOOLCHAIN_ROOT = $(TOOLCHAIN_ROOT)) |
148 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT)) | 161 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT)) |
149 $(info Using PNACL_BIN_PATH = $(PNACL_BIN_PATH)) | 162 $(info Using PNACL_BIN_PATH = $(PNACL_BIN_PATH)) |
150 $(info Using CLANG_PATH = $(CLANG_PATH)) | 163 $(info Using CLANG_PATH = $(CLANG_PATH)) |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 # Use runtime.is.built so that build-runtime.py is invoked only once | 395 # Use runtime.is.built so that build-runtime.py is invoked only once |
383 # even in a parallel build. | 396 # even in a parallel build. |
384 .INTERMEDIATE: runtime.is.built | 397 .INTERMEDIATE: runtime.is.built |
385 $(RT_OBJ): runtime.is.built | 398 $(RT_OBJ): runtime.is.built |
386 runtime.is.built: $(RT_SRC) pydir/build-runtime.py | 399 runtime.is.built: $(RT_SRC) pydir/build-runtime.py |
387 @echo ================ Building Subzero runtime ================ | 400 @echo ================ Building Subzero runtime ================ |
388 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT) | 401 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT) |
389 | 402 |
390 check-lit: $(OBJDIR)/pnacl-sz make_symlink | 403 check-lit: $(OBJDIR)/pnacl-sz make_symlink |
391 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ | 404 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ |
392 » $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit | 405 » $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit $(FORCEASM_LIT_PARAM) |
393 | 406 |
394 ifdef MINIMAL | 407 ifdef MINIMAL |
395 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime | 408 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime |
396 @echo "Crosstests disabled, minimal build" | 409 @echo "Crosstests disabled, minimal build" |
397 else | 410 else |
398 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime | 411 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime |
399 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. | 412 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. |
400 # For (slow) sandboxed tests, limit to Om1/sse4.1. | 413 # For (slow) sandboxed tests, limit to Om1/sse4.1. |
401 # TODO(jpp): implement x8664 sandbox, then enable xtests. | 414 # TODO(jpp): implement x8664 sandbox, then enable xtests. |
402 # TODO(jpp): reenable the x86-64 tests. | 415 # TODO(jpp): reenable the x86-64 tests. |
403 ./pydir/crosstest_generator.py -v --lit \ | 416 ./pydir/crosstest_generator.py -v --lit \ |
404 --toolchain-root $(TOOLCHAIN_ROOT) \ | 417 --toolchain-root $(TOOLCHAIN_ROOT) \ |
418 $(FORCEASM_FLAG) \ | |
419 $(FORCEASM_XTEST_EXCLUDES) \ | |
405 -i x8632,native,sse2 \ | 420 -i x8632,native,sse2 \ |
406 -i x8632,native,sse4.1,test_vector_ops \ | 421 -i x8632,native,sse4.1,test_vector_ops \ |
407 -i x8632,sandbox,sse4.1,Om1 \ | 422 -i x8632,sandbox,sse4.1,Om1 \ |
408 -i x8632,nonsfi,sse2,O2 \ | 423 -i x8632,nonsfi,sse2,O2 \ |
409 -i x8664,native,sse2 \ | 424 -i x8664,native,sse2 \ |
410 -i x8664,native,sse4.1,test_vector_ops \ | 425 -i x8664,native,sse4.1,test_vector_ops \ |
411 -e x8664,sandbox,sse4.1,Om1 \ | 426 -e x8664,sandbox,sse4.1,Om1 \ |
412 -i arm32,neon \ | 427 -i arm32,neon \ |
413 -e arm32,nonsfi \ | 428 -e arm32,nonsfi \ |
414 -e arm32,neon,test_vector_ops \ | 429 -e arm32,neon,test_vector_ops \ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
460 +make -f Makefile.standalone format | 475 +make -f Makefile.standalone format |
461 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. | 476 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. |
462 +make -f Makefile.standalone \ | 477 +make -f Makefile.standalone \ |
463 MINIMAL=1 check | 478 MINIMAL=1 check |
464 # Check that there are no g++ build errors or warnings. | 479 # Check that there are no g++ build errors or warnings. |
465 +make -f Makefile.standalone \ | 480 +make -f Makefile.standalone \ |
466 GPLUSPLUS=1 compile_only | 481 GPLUSPLUS=1 compile_only |
467 # Check the x86 assembler unit tests. | 482 # Check the x86 assembler unit tests. |
468 +make -f Makefile.standalone \ | 483 +make -f Makefile.standalone \ |
469 DEBUG=1 CHECK_X86_ASM=1 check-unit | 484 DEBUG=1 CHECK_X86_ASM=1 check-unit |
470 # Run spec2k for x86-32. | 485 # Run spec2k for x86-32. |
Jim Stichnoth
2016/01/10 03:08:55
Can you fix this comment? It's actually running l
sehr
2016/01/11 21:49:47
Done.
| |
471 +make -f Makefile.standalone \ | 486 +make -f Makefile.standalone \ |
472 check check-spec | 487 check check-spec |
473 # Build spec2k under -Om1/x86-32, to check for liveness errors. | 488 # Build spec2k under -Om1/x86-32, to check for liveness errors. |
474 +make -f Makefile.standalone \ | 489 +make -f Makefile.standalone \ |
475 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | 490 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec |
476 # Run spec2k for x86-32 without advanced phi lowering. | 491 # Run spec2k for x86-32 without advanced phi lowering. |
477 +make -f Makefile.standalone \ | 492 +make -f Makefile.standalone \ |
478 SPECFLAGS='--sz=--phi-edge-split=0' check-spec | 493 SPECFLAGS='--sz=--phi-edge-split=0' check-spec |
494 # Run cross tests and lit tests to validate filetype=asm output. | |
495 +make -f Makefile.standalone \ | |
496 check-xtest FORCEASM=1 | |
Jim Stichnoth
2016/01/10 03:08:55
Can you do this with a single sub-command?
+make
sehr
2016/01/11 21:49:47
Done.
| |
497 +make -f Makefile.standalone \ | |
498 check-lit FORCEASM=1 | |
479 # Build spec2k for arm32. | 499 # Build spec2k for arm32. |
480 +make -f Makefile.standalone \ | 500 +make -f Makefile.standalone \ |
481 TARGET=arm32 SPECBUILDONLY=true check-spec | 501 TARGET=arm32 SPECBUILDONLY=true check-spec |
482 # Build spec2k under -Om1/arm32. | 502 # Build spec2k under -Om1/arm32. |
483 +make -f Makefile.standalone \ | 503 +make -f Makefile.standalone \ |
484 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | 504 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec |
485 # Run a few spec2k tests for arm32 using qemu. | 505 # Run a few spec2k tests for arm32 using qemu. |
486 +make -f Makefile.standalone \ | 506 +make -f Makefile.standalone \ |
487 TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec | 507 TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec |
488 # Provide validation of user awesomeness! | 508 # Provide validation of user awesomeness! |
(...skipping 21 matching lines...) Expand all Loading... | |
510 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html | 530 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html |
511 | 531 |
512 docs: | 532 docs: |
513 make -C docs -f Makefile.standalone | 533 make -C docs -f Makefile.standalone |
514 | 534 |
515 clean: | 535 clean: |
516 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 536 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
517 | 537 |
518 clean-all: clean | 538 clean-all: clean |
519 rm -rf build/ crosstest/Output/ | 539 rm -rf build/ crosstest/Output/ |
OLD | NEW |