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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 330 $(SBB_OBJDIR)/pnacl_public_x86_32_pnacl_sz_nexe \ | 330 $(SBB_OBJDIR)/pnacl_public_x86_32_pnacl_sz_nexe \ |
| 331 $(SBB_OBJDIR)/pnacl_public_x86_64_pnacl_sz_nexe | 331 $(SBB_OBJDIR)/pnacl_public_x86_64_pnacl_sz_nexe |
| 332 | 332 |
| 333 # Keep all the first target so it's the default. | 333 # Keep all the first target so it's the default. |
| 334 all: $(OBJDIR)/pnacl-sz make_symlink runtime | 334 all: $(OBJDIR)/pnacl-sz make_symlink runtime |
| 335 | 335 |
| 336 ifdef TSAN | 336 ifdef TSAN |
| 337 sb: | 337 sb: |
| 338 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl." | 338 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl." |
| 339 else | 339 else |
| 340 sb: $(NEXES) sb_make_symlink | 340 sb: $(NEXES) sb_make_symlink exists-sbtc |
| 341 endif | 341 endif |
| 342 | 342 |
| 343 # SHOW_BUILD_ATTS is an executable that is run to show what build | 343 # SHOW_BUILD_ATTS is an executable that is run to show what build |
| 344 # attributes were used to build pnacl-sz. | 344 # attributes were used to build pnacl-sz. |
| 345 SHOW_BUILD_ATTS = $(OBJDIR)/pnacl-sz --build-atts | 345 SHOW_BUILD_ATTS = $(OBJDIR)/pnacl-sz --build-atts |
| 346 | 346 |
| 347 # Creates symbolic link so that testing is easier. Also runs | 347 # Creates symbolic link so that testing is easier. Also runs |
| 348 # pnacl-sz to verify that the defines flags have valid values, | 348 # pnacl-sz to verify that the defines flags have valid values, |
| 349 # as well as describe the corresponding build attributes. | 349 # as well as describe the corresponding build attributes. |
| 350 make_symlink: $(OBJDIR)/pnacl-sz | 350 make_symlink: $(OBJDIR)/pnacl-sz |
| 351 rm -rf pnacl-sz | 351 rm -rf pnacl-sz |
| 352 ln -s $(OBJDIR)/pnacl-sz | 352 ln -s $(OBJDIR)/pnacl-sz |
| 353 @echo "Build Attributes:" | 353 @echo "Build Attributes:" |
| 354 @$(SHOW_BUILD_ATTS) | 354 @$(SHOW_BUILD_ATTS) |
| 355 | 355 |
| 356 sb_make_symlink: $(NEXES) | 356 sb_make_symlink: $(NEXES) |
| 357 $(foreach nexe,$(NEXES),rm -rf $(notdir $(nexe)); ln -s $(nexe);) | 357 $(foreach nexe,$(NEXES),rm -rf $(notdir $(nexe)); ln -s $(nexe);) |
| 358 | 358 |
| 359 %.pexe : %.nonfinal.pexe | 359 %.pexe : %.nonfinal.pexe |
| 360 $(SB_FINALIZE) -o $@ $< | 360 $(SB_FINALIZE) -o $@ $< |
| 361 | 361 |
| 362 .PHONY: all compile_only make_symlink runtime bloat sb docs help \ | 362 .PHONY: all compile_only make_symlink runtime bloat sb docs help \ |
| 363 help-check-lit help-check-xtest | 363 help-check-lit help-check-xtest exists-nonsfi-x8632 \ |
| 364 exists-nonsfi-arm32 exists-sbtc exists-spec | |
| 364 | 365 |
| 365 compile_only: $(OBJS) | 366 compile_only: $(OBJS) |
| 366 | 367 |
| 367 $(OBJDIR)/pnacl-sz: $(OBJS) | 368 $(OBJDIR)/pnacl-sz: $(OBJS) |
| 368 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ | 369 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ |
| 369 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) | 370 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
| 370 | 371 |
| 371 $(SB_OBJDIR)/pnacl-sz.nonfinal.pexe: $(SB_OBJS) | 372 $(SB_OBJDIR)/pnacl-sz.nonfinal.pexe: $(SB_OBJS) |
| 372 $(SB_CXX) $(SB_LDFLAGS) -o $@ $^ $(SB_LLVM_LDFLAGS) | 373 $(SB_CXX) $(SB_LDFLAGS) -o $@ $^ $(SB_LLVM_LDFLAGS) |
| 373 | 374 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 460 | 461 |
| 461 check-lit: $(OBJDIR)/pnacl-sz make_symlink | 462 check-lit: $(OBJDIR)/pnacl-sz make_symlink |
| 462 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ | 463 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ |
| 463 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_LIT_TESTS) \ | 464 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_LIT_TESTS) \ |
| 464 $(FORCEASM_LIT_TEST_EXCLUDES) $(FORCEASM_LIT_PARAM) | 465 $(FORCEASM_LIT_TEST_EXCLUDES) $(FORCEASM_LIT_PARAM) |
| 465 | 466 |
| 466 ifdef MINIMAL | 467 ifdef MINIMAL |
| 467 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime | 468 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime |
| 468 @echo "Crosstests disabled, minimal build" | 469 @echo "Crosstests disabled, minimal build" |
| 469 else | 470 else |
| 470 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime | 471 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime \ |
| 472 exists-nonsfi-x8632 exists-nonsfi-arm32 | |
| 471 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. | 473 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. |
| 472 # For (slow) sandboxed tests, limit to Om1/sse4.1. | 474 # For (slow) sandboxed tests, limit to Om1/sse4.1. |
| 473 # run.py (used to run the sandboxed xtests) does not support | 475 # run.py (used to run the sandboxed xtests) does not support |
| 474 # specifying -cpu cortex-a15 to qemu, hence we disable the | 476 # specifying -cpu cortex-a15 to qemu, hence we disable the |
| 475 # hwdiv-arm tests. | 477 # hwdiv-arm tests. |
| 476 ./pydir/crosstest_generator.py -v --lit \ | 478 ./pydir/crosstest_generator.py -v --lit \ |
| 477 --toolchain-root $(TOOLCHAIN_ROOT) \ | 479 --toolchain-root $(TOOLCHAIN_ROOT) \ |
| 478 $(FORCEASM_FLAG) \ | 480 $(FORCEASM_FLAG) \ |
| 479 $(FORCEASM_XTEST_EXCLUDES) \ | 481 $(FORCEASM_XTEST_EXCLUDES) \ |
| 480 -i x8632,native,sse2 \ | 482 -i x8632,native,sse2 \ |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 517 SPEC := --filetype=obj | 519 SPEC := --filetype=obj |
| 518 endif | 520 endif |
| 519 SPECFLAGS := -O2 | 521 SPECFLAGS := -O2 |
| 520 SPECBUILDONLY := false | 522 SPECBUILDONLY := false |
| 521 %.spec2k: % $(OBJDIR)/pnacl-sz make_symlink runtime | 523 %.spec2k: % $(OBJDIR)/pnacl-sz make_symlink runtime |
| 522 ./pydir/szbuild_spec2k.py -v \ | 524 ./pydir/szbuild_spec2k.py -v \ |
| 523 $(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $< | 525 $(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $< |
| 524 $(SPECBUILDONLY) || ( cd ../../../tests/spec2k; \ | 526 $(SPECBUILDONLY) || ( cd ../../../tests/spec2k; \ |
| 525 ./run_all.sh RunTimedBenchmarks $(SETUP) train $< ) | 527 ./run_all.sh RunTimedBenchmarks $(SETUP) train $< ) |
| 526 | 528 |
| 527 check-spec: $(ALLSPEC:=.spec2k) | 529 check-spec: exists-spec $(ALLSPEC:=.spec2k) |
| 528 | 530 |
| 529 check: check-lit check-unit check-xtest | 531 check: check-lit check-unit check-xtest |
| 530 | 532 |
| 531 check-presubmit presubmit: | 533 NONSFI_LOADER_X8632 = \ |
| 534 $(NACL_ROOT)/scons-out/opt-linux-x86-32/obj/src/nonsfi/loader/nonsfi_loader | |
| 535 NONSFI_LOADER_ARM32 = \ | |
| 536 $(NACL_ROOT)/scons-out/opt-linux-arm/obj/src/nonsfi/loader/nonsfi_loader | |
| 537 SBTC_LIBFILE = $(SB_LLVM_PATH)/lib/libLLVMSupport.a | |
| 538 SPEC_SAMPLE_PEXE = $(NACL_ROOT)/tests/spec2k/176.gcc/gcc.opt.stripped.pexe | |
| 539 | |
| 540 exists-nonsfi-x8632: | |
| 541 » @if [ ! -f $(NONSFI_LOADER_X8632) ] ; then \ | |
| 542 echo "Missing file $(NONSFI_LOADER_X8632)"; \ | |
| 543 echo "Consider running 'scons nonsfi_loader'" \ | |
|
John
2016/03/11 16:40:26
maybe you could auto-build the nonsfi-loader here.
Jim Stichnoth
2016/03/11 22:58:08
I thought about that, but I'd rather not try to be
| |
| 544 "in the native_client directory."; \ | |
| 545 exit 1 ; \ | |
| 546 fi | |
| 547 | |
| 548 exists-nonsfi-arm32: | |
| 549 » @if [ ! -f $(NONSFI_LOADER_ARM32) ] ; then \ | |
| 550 echo "Missing file $(NONSFI_LOADER_ARM32)"; \ | |
| 551 echo "Consider running 'scons platform=arm32 nonsfi_loader'" \ | |
| 552 "in the native_client directory."; \ | |
| 553 exit 1 ; \ | |
| 554 fi | |
| 555 | |
| 556 exists-sbtc: | |
| 557 » @if [ ! -f $(SBTC_LIBFILE) ] ; then \ | |
| 558 echo "Missing file $(SBTC_LIBFILE)"; \ | |
| 559 echo "Consider running 'toolchain_build_pnacl.py --build-sbtc'."; \ | |
| 560 exit 1 ; \ | |
| 561 fi | |
| 562 | |
| 563 exists-spec: | |
| 564 » @if [ ! -f $(SPEC_SAMPLE_PEXE) ] ; then \ | |
| 565 echo "Missing file $(SPEC_SAMPLE_PEXE)"; \ | |
| 566 echo "Consider running" \ | |
| 567 "'run_all.sh BuildBenchmarks 0 SetupPnaclX8632Opt'" \ | |
| 568 "in the native_client/tests/spec2k directory."; \ | |
| 569 exit 1 ; \ | |
| 570 fi | |
| 571 | |
| 572 check-presubmit presubmit: exists-nonsfi-x8632 exists-nonsfi-arm32 \ | |
| 573 exists-sbtc exists-spec | |
| 532 # Make sure clang-format gets run. | 574 # Make sure clang-format gets run. |
| 533 +make -f Makefile.standalone format | 575 +make -f Makefile.standalone format |
| 534 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. | 576 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. |
| 535 +make -f Makefile.standalone \ | 577 +make -f Makefile.standalone \ |
| 536 MINIMAL=1 check | 578 MINIMAL=1 check |
| 537 # Check that there are no g++ build errors or warnings. | 579 # Check that there are no g++ build errors or warnings. |
| 538 +make -f Makefile.standalone \ | 580 +make -f Makefile.standalone \ |
| 539 GPLUSPLUS=1 compile_only | 581 GPLUSPLUS=1 compile_only |
| 540 # Check the x86 assembler unit tests. | 582 # Check the x86 assembler unit tests. |
| 541 +make -f Makefile.standalone \ | 583 +make -f Makefile.standalone \ |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 611 @cat Makefile.standalone-help/check-lit.txt | 653 @cat Makefile.standalone-help/check-lit.txt |
| 612 | 654 |
| 613 help-check-xtest: | 655 help-check-xtest: |
| 614 @cat Makefile.standalone-help/check-xtest.txt | 656 @cat Makefile.standalone-help/check-xtest.txt |
| 615 | 657 |
| 616 clean: | 658 clean: |
| 617 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ | 659 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ |
| 618 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json | 660 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json |
| 619 | 661 |
| 620 clean-all: clean | 662 clean-all: clean |
| 621 » rm -rf build/ crosstest/Output/ | 663 » rm -rf build/ crosstest/Output/ |
| OLD | NEW |