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/ |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 AssemblerX8664/Other.cpp | 347 AssemblerX8664/Other.cpp |
| 348 endif | 348 endif |
| 349 | 349 |
| 350 UNITTEST_OBJS = $(patsubst %.cpp, $(OBJDIR)/unittest/%.o, $(UNITTEST_SRCS)) | 350 UNITTEST_OBJS = $(patsubst %.cpp, $(OBJDIR)/unittest/%.o, $(UNITTEST_SRCS)) |
| 351 UNITTEST_LIB_OBJS = $(filter-out $(OBJDIR)/main.o,$(OBJS)) | 351 UNITTEST_LIB_OBJS = $(filter-out $(OBJDIR)/main.o,$(OBJS)) |
| 352 | 352 |
| 353 NEXES = $(SB_OBJDIR)/pnacl-sz.x8632.nexe \ | 353 NEXES = $(SB_OBJDIR)/pnacl-sz.x8632.nexe \ |
| 354 $(SB_OBJDIR)/pnacl-sz.x8664.nexe \ | 354 $(SB_OBJDIR)/pnacl-sz.x8664.nexe \ |
| 355 $(SBB_OBJDIR)/pnacl_public_x86_32_pnacl_sz_nexe \ | 355 $(SBB_OBJDIR)/pnacl_public_x86_32_pnacl_sz_nexe \ |
| 356 $(SBB_OBJDIR)/pnacl_public_x86_64_pnacl_sz_nexe | 356 $(SBB_OBJDIR)/pnacl_public_x86_64_pnacl_sz_nexe |
| 357 NEXES_LITE = $(SB_OBJDIR)/pnacl-sz.x8664.nexe | |
|
Eric Holk
2016/03/21 18:26:38
Does this bake in the assumption that PNaCl develo
Jim Stichnoth
2016/03/21 18:59:33
Not really. This just picks one nexe to push all
Eric Holk
2016/03/21 19:20:48
Okay, cool.
| |
| 357 | 358 |
| 358 # Keep all the first target so it's the default. | 359 # Keep all the first target so it's the default. |
| 359 all: $(OBJDIR)/pnacl-sz make_symlink runtime | 360 all: $(OBJDIR)/pnacl-sz make_symlink runtime |
| 360 | 361 |
| 361 ifdef TSAN | 362 ifdef TSAN |
| 362 sb: | 363 sb sb-lite: |
| 363 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl." | 364 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl." |
| 364 else | 365 else |
| 365 sb: $(NEXES) sb_make_symlink exists-sbtc | 366 sb: $(NEXES) sb_make_symlink exists-sbtc |
| 367 sb-lite: $(NEXES_LITE) exists-sbtc | |
| 366 endif | 368 endif |
| 367 | 369 |
| 368 # SHOW_BUILD_ATTS is an executable that is run to show what build | 370 # SHOW_BUILD_ATTS is an executable that is run to show what build |
| 369 # attributes were used to build pnacl-sz. | 371 # attributes were used to build pnacl-sz. |
| 370 SHOW_BUILD_ATTS = $(OBJDIR)/pnacl-sz --build-atts | 372 SHOW_BUILD_ATTS = $(OBJDIR)/pnacl-sz --build-atts |
| 371 | 373 |
| 372 # Creates symbolic link so that testing is easier. Also runs | 374 # Creates symbolic link so that testing is easier. Also runs |
| 373 # pnacl-sz to verify that the defines flags have valid values, | 375 # pnacl-sz to verify that the defines flags have valid values, |
| 374 # as well as describe the corresponding build attributes. | 376 # as well as describe the corresponding build attributes. |
| 375 make_symlink: $(OBJDIR)/pnacl-sz | 377 make_symlink: $(OBJDIR)/pnacl-sz |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 485 runtime.is.built: $(RT_SRC) pydir/build-runtime.py | 487 runtime.is.built: $(RT_SRC) pydir/build-runtime.py |
| 486 @echo ================ Building Subzero runtime ================ | 488 @echo ================ Building Subzero runtime ================ |
| 487 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT) | 489 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT) |
| 488 | 490 |
| 489 check-lit: $(OBJDIR)/pnacl-sz make_symlink | 491 check-lit: $(OBJDIR)/pnacl-sz make_symlink |
| 490 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ | 492 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ |
| 491 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_LIT_TESTS) \ | 493 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_LIT_TESTS) \ |
| 492 $(FORCEASM_LIT_TEST_EXCLUDES) $(FORCEASM_LIT_PARAM) | 494 $(FORCEASM_LIT_TEST_EXCLUDES) $(FORCEASM_LIT_PARAM) |
| 493 | 495 |
| 494 ifdef MINIMAL | 496 ifdef MINIMAL |
| 495 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime | 497 check-xtest check-xtest-lite: $(OBJDIR)/pnacl-sz make_symlink runtime |
| 496 @echo "Crosstests disabled, minimal build" | 498 @echo "Crosstests disabled, minimal build" |
| 497 else | 499 else |
| 498 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime \ | 500 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime \ |
| 499 exists-nonsfi-x8632 exists-nonsfi-arm32 | 501 exists-nonsfi-x8632 exists-nonsfi-arm32 |
| 500 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. | 502 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. |
| 501 # For (slow) sandboxed tests, limit to Om1/sse4.1. | 503 # For (slow) sandboxed tests, limit to Om1/sse4.1. |
| 502 # run.py (used to run the sandboxed xtests) does not support | 504 # run.py (used to run the sandboxed xtests) does not support |
| 503 # specifying -cpu cortex-a15 to qemu, hence we disable the | 505 # specifying -cpu cortex-a15 to qemu, hence we disable the |
| 504 # hwdiv-arm tests. | 506 # hwdiv-arm tests. |
| 505 ./pydir/crosstest_generator.py -v --lit \ | 507 ./pydir/crosstest_generator.py -v --lit \ |
| 506 --toolchain-root $(TOOLCHAIN_ROOT) \ | 508 --toolchain-root $(TOOLCHAIN_ROOT) \ |
| 507 $(FORCEASM_FLAG) \ | 509 $(FORCEASM_FLAG) \ |
| 508 $(FORCEASM_XTEST_EXCLUDES) \ | 510 $(FORCEASM_XTEST_EXCLUDES) \ |
| 509 -i x8632,native,sse2 \ | 511 -i x8632,native,sse2 \ |
| 510 -i x8632,native,sse4.1,test_vector_ops \ | 512 -i x8632,native,sse4.1,test_vector_ops \ |
| 511 -i x8632,sandbox,sse4.1,Om1 \ | 513 -i x8632,sandbox,sse4.1,Om1 \ |
| 512 -i x8632,nonsfi,sse2,O2 \ | 514 -i x8632,nonsfi,sse2,O2 \ |
| 513 -i x8664,native,sse2 \ | 515 -i x8664,native,sse2 \ |
| 514 -i x8664,native,sse4.1,test_vector_ops \ | 516 -i x8664,native,sse4.1,test_vector_ops \ |
| 515 -i x8664,sandbox,sse4.1,Om1 \ | 517 -i x8664,sandbox,sse4.1,Om1 \ |
| 516 -i arm32 \ | 518 -i arm32 \ |
| 517 -e arm32,sandbox,hwdiv-arm | 519 -e arm32,sandbox,hwdiv-arm |
| 518 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ | 520 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ |
| 519 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_XTEST_TESTS) | 521 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_XTEST_TESTS) |
| 522 check-xtest-lite: $(OBJDIR)/pnacl-sz make_symlink runtime \ | |
| 523 exists-nonsfi-x8632 exists-nonsfi-arm32 | |
| 524 # Do all native/sse2/neon tests, which are relatively fast. | |
| 525 # Limit to test_global+mem_intrin for sandbox+nonsfi because sandbox and | |
| 526 # nonsfi builds are slow, and test_global and mem_intrin are the most | |
| 527 # common sources of problems. | |
| 528 ./pydir/crosstest_generator.py -v --lit \ | |
| 529 --toolchain-root $(TOOLCHAIN_ROOT) \ | |
| 530 $(FORCEASM_FLAG) \ | |
| 531 $(FORCEASM_XTEST_EXCLUDES) \ | |
| 532 -i x8632,native,sse2,O2 \ | |
| 533 -i x8664,native,sse2,O2 \ | |
| 534 -i arm32,native,neon,O2 \ | |
| 535 -i x8632,sse2,O2,test_global \ | |
| 536 -i x8632,sse2,O2,mem_intrin \ | |
| 537 -i x8664,sse2,O2,test_global \ | |
| 538 -i x8664,sse2,O2,mem_intrin \ | |
| 539 -i arm32,neon,O2,test_global \ | |
| 540 -i arm32,neon,O2,mem_intrin \ | |
| 541 -e x8664,nonsfi | |
| 542 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ | |
| 543 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_XTEST_TESTS) | |
| 520 endif | 544 endif |
| 521 | 545 |
| 522 check-unit: $(OBJDIR)/run_unittests | 546 check-unit: $(OBJDIR)/run_unittests |
| 523 $(OBJDIR)/run_unittests | 547 $(OBJDIR)/run_unittests |
| 524 | 548 |
| 525 # List the spec2k components in roughly reverse order of runtime, to help with | 549 # List the spec2k components in roughly reverse order of runtime, to help with |
| 526 # parallel execution speed. | 550 # parallel execution speed. |
| 527 ALLSPEC := 253.perlbmk 177.mesa 188.ammp 256.bzip2 164.gzip 179.art 183.equake \ | 551 ALLSPEC := 253.perlbmk 177.mesa 188.ammp 256.bzip2 164.gzip 179.art 183.equake \ |
| 528 175.vpr 176.gcc 181.mcf 186.crafty 197.parser 254.gap 255.vortex \ | 552 175.vpr 176.gcc 181.mcf 186.crafty 197.parser 254.gap 255.vortex \ |
| 529 300.twolf 252.eon | 553 300.twolf 252.eon |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 636 # Build spec2k under -Om1/arm32. | 660 # Build spec2k under -Om1/arm32. |
| 637 +make -f Makefile.standalone \ | 661 +make -f Makefile.standalone \ |
| 638 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | 662 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec |
| 639 # Run a few spec2k tests for arm32 using qemu. Keep the list sorted in | 663 # Run a few spec2k tests for arm32 using qemu. Keep the list sorted in |
| 640 # roughly reverse order of runtime. | 664 # roughly reverse order of runtime. |
| 641 +make -f Makefile.standalone \ | 665 +make -f Makefile.standalone \ |
| 642 TARGET=arm32 ALLSPEC='252.eon 254.gap 176.gcc 181.mcf' check-spec | 666 TARGET=arm32 ALLSPEC='252.eon 254.gap 176.gcc 181.mcf' check-spec |
| 643 # Provide validation of user awesomeness! | 667 # Provide validation of user awesomeness! |
| 644 echo Success | 668 echo Success |
| 645 | 669 |
| 670 presubmit-lite: exists-nonsfi-x8632 exists-nonsfi-arm32 \ | |
| 671 exists-sbtc exists-spec | |
| 672 # Make sure clang-format gets run. | |
| 673 +make -f Makefile.standalone format | |
| 674 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. | |
| 675 +make -f Makefile.standalone \ | |
| 676 MINIMAL=1 check $(SB_OBJDIR)/pnacl-sz.x8664.nexe | |
| 677 # Check that there are no g++ build errors or warnings. | |
| 678 +make -f Makefile.standalone \ | |
| 679 GPLUSPLUS=1 compile_only | |
| 680 # Run lit tests, cross tests, unit tests, and spec2k/x86-32. | |
| 681 +make -f Makefile.standalone \ | |
| 682 check-lit check-unit check-spec | |
| 683 +make -f Makefile.standalone \ | |
| 684 check-xtest-lite | |
| 685 # Run spec2k/x86-64. | |
| 686 +make -f Makefile.standalone \ | |
| 687 TARGET=x8664 check-spec | |
| 688 # Build spec2k under -Om1/x86-32, to check for liveness errors. | |
| 689 +make -f Makefile.standalone \ | |
| 690 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | |
| 691 # Build spec2k under -Om1/x86-64, to check for liveness errors. | |
| 692 +make -f Makefile.standalone \ | |
| 693 SPECFLAGS='-Om1' TARGET=x8664 SPECBUILDONLY=true check-spec | |
| 694 # Run cross tests and lit tests to validate filetype=asm output. | |
| 695 +make -f Makefile.standalone \ | |
| 696 FORCEASM=1 check-lit | |
| 697 +make -f Makefile.standalone \ | |
| 698 FORCEASM=1 check-xtest-lite | |
| 699 # Build spec2k under -Om1/arm32. | |
| 700 +make -f Makefile.standalone \ | |
| 701 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | |
| 702 # Run a few spec2k tests for arm32 using qemu. Keep the list sorted in | |
| 703 # roughly reverse order of runtime. | |
| 704 +make -f Makefile.standalone \ | |
| 705 TARGET=arm32 ALLSPEC='254.gap 176.gcc 181.mcf' check-spec | |
| 706 # Provide validation of user awesomeness! | |
| 707 echo Success | |
| 708 | |
| 646 FORMAT_BLACKLIST = | 709 FORMAT_BLACKLIST = |
| 647 # Add one of the following lines for each source file to ignore. | 710 # Add one of the following lines for each source file to ignore. |
| 648 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp | 711 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp |
| 649 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp | 712 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp |
| 650 FORMAT_BLACKLIST += ! -name assembler_arm.h | 713 FORMAT_BLACKLIST += ! -name assembler_arm.h |
| 651 FORMAT_BLACKLIST += ! -name assembler_arm.cc | 714 FORMAT_BLACKLIST += ! -name assembler_arm.cc |
| 652 format: | 715 format: |
| 653 $(CLANG_FORMAT_PATH)/clang-format -style=LLVM -i \ | 716 $(CLANG_FORMAT_PATH)/clang-format -style=LLVM -i \ |
| 654 `find . -regex '.*\.\(c\|h\|cpp\)' $(FORMAT_BLACKLIST)` | 717 `find . -regex '.*\.\(c\|h\|cpp\)' $(FORMAT_BLACKLIST)` |
| 655 | 718 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 681 | 744 |
| 682 help-check-xtest: | 745 help-check-xtest: |
| 683 @cat Makefile.standalone-help/check-xtest.txt | 746 @cat Makefile.standalone-help/check-xtest.txt |
| 684 | 747 |
| 685 clean: | 748 clean: |
| 686 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ | 749 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ |
| 687 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json | 750 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json |
| 688 | 751 |
| 689 clean-all: clean | 752 clean-all: clean |
| 690 rm -rf build/ crosstest/Output/ | 753 rm -rf build/ crosstest/Output/ |
| OLD | NEW |