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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1 | 89 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1 |
90 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0 | 90 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0 |
91 | 91 |
92 ifdef NOASSERT | 92 ifdef NOASSERT |
93 ASSERTIONS = -DNDEBUG | 93 ASSERTIONS = -DNDEBUG |
94 else | 94 else |
95 ASSERTIONS = | 95 ASSERTIONS = |
96 OBJDIR := $(OBJDIR)+Asserts | 96 OBJDIR := $(OBJDIR)+Asserts |
97 endif | 97 endif |
98 | 98 |
| 99 # Use g++ to compile, to check for errors/warnings that clang++ might have |
| 100 # missed. It's unlikely to link, unless LLVM was also built with g++, so the |
| 101 # compile_only target should be used. |
| 102 ifdef GPLUSPLUS |
| 103 CXX = CCACHE_CPP2=yes $(CCACHE) g++ |
| 104 STDLIB_FLAGS = |
| 105 LLVM_EXTRA_WARNINGS="-Wno-unknown-pragmas -Wno-unused-parameter \ |
| 106 -Wno-comment -Wno-enum-compare -Wno-strict-aliasing" |
| 107 OBJDIR := $(OBJDIR)+Gplusplus |
| 108 endif |
| 109 |
99 ifdef UBSAN | 110 ifdef UBSAN |
100 OBJDIR := $(OBJDIR)+UBSan | 111 OBJDIR := $(OBJDIR)+UBSan |
101 CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr \ | 112 CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr \ |
102 -fno-sanitize=nonnull-attribute | 113 -fno-sanitize=nonnull-attribute |
103 LD_EXTRA += -fsanitize=undefined | 114 LD_EXTRA += -fsanitize=undefined |
104 endif | 115 endif |
105 | 116 |
106 ifdef UBSAN_TRAP | 117 ifdef UBSAN_TRAP |
107 OBJDIR := $(OBJDIR)+UBSan_Trap | 118 OBJDIR := $(OBJDIR)+UBSan_Trap |
108 CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error \ | 119 CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error \ |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 check-spec: $(ALLSPEC:=.spec2k) | 441 check-spec: $(ALLSPEC:=.spec2k) |
431 | 442 |
432 check: check-lit check-unit check-xtest | 443 check: check-lit check-unit check-xtest |
433 | 444 |
434 check-presubmit presubmit: | 445 check-presubmit presubmit: |
435 # Make sure clang-format gets run. | 446 # Make sure clang-format gets run. |
436 +make -f Makefile.standalone format | 447 +make -f Makefile.standalone format |
437 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. | 448 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. |
438 +make -f Makefile.standalone \ | 449 +make -f Makefile.standalone \ |
439 MINIMAL=1 check | 450 MINIMAL=1 check |
| 451 # Check that there are no g++ build errors or warnings. |
| 452 +make -f Makefile.standalone \ |
| 453 GPLUSPLUS=1 compile_only |
440 # Check the x86 assembler unit tests. | 454 # Check the x86 assembler unit tests. |
441 +make -f Makefile.standalone \ | 455 +make -f Makefile.standalone \ |
442 DEBUG=1 CHECK_X86_ASM=1 check-unit | 456 DEBUG=1 CHECK_X86_ASM=1 check-unit |
443 # Check that there are no g++ build errors or warnings. | |
444 +make -f Makefile.standalone clean | |
445 +make -f Makefile.standalone compile_only \ | |
446 CXX=g++ STDLIB_FLAGS= \ | |
447 LLVM_EXTRA_WARNINGS="-Wno-unknown-pragmas -Wno-unused-parameter \ | |
448 -Wno-comment -Wno-enum-compare -Wno-strict-aliasing" | |
449 +make -f Makefile.standalone clean | |
450 # Run spec2k for x86-32. | 457 # Run spec2k for x86-32. |
451 +make -f Makefile.standalone \ | 458 +make -f Makefile.standalone \ |
452 check check-spec | 459 check check-spec |
453 # Build spec2k under -Om1/x86-32, to check for liveness errors. | 460 # Build spec2k under -Om1/x86-32, to check for liveness errors. |
454 +make -f Makefile.standalone \ | 461 +make -f Makefile.standalone \ |
455 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | 462 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec |
456 # Run spec2k for x86-32 without advanced phi lowering. | 463 # Run spec2k for x86-32 without advanced phi lowering. |
457 +make -f Makefile.standalone \ | 464 +make -f Makefile.standalone \ |
458 SPECFLAGS='--sz=--phi-edge-split=0' check-spec | 465 SPECFLAGS='--sz=--phi-edge-split=0' check-spec |
459 # Build spec2k for arm32. | 466 # Build spec2k for arm32. |
460 +make -f Makefile.standalone \ | 467 +make -f Makefile.standalone \ |
461 TARGET=arm32 SPECBUILDONLY=true check-spec | 468 TARGET=arm32 SPECBUILDONLY=true check-spec |
462 # Build spec2k under -Om1/arm32. | 469 # Build spec2k under -Om1/arm32. |
463 +make -f Makefile.standalone \ | 470 +make -f Makefile.standalone \ |
464 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | 471 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec |
465 # Run a few spec2k tests for arm32 using qemu. | 472 # Run a few spec2k tests for arm32 using qemu. |
466 +make -f Makefile.standalone \ | 473 +make -f Makefile.standalone \ |
467 TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec | 474 TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec |
468 # Verify that all changes are committed (including clang-format above). | |
469 git diff --quiet | |
470 # Provide validation of user awesomeness! | 475 # Provide validation of user awesomeness! |
471 echo Success | 476 echo Success |
472 | 477 |
473 FORMAT_BLACKLIST = | 478 FORMAT_BLACKLIST = |
474 # Add one of the following lines for each source file to ignore. | 479 # Add one of the following lines for each source file to ignore. |
475 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp | 480 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp |
476 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp | 481 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp |
477 FORMAT_BLACKLIST += ! -name assembler_arm.h | 482 FORMAT_BLACKLIST += ! -name assembler_arm.h |
478 FORMAT_BLACKLIST += ! -name assembler_arm.cc | 483 FORMAT_BLACKLIST += ! -name assembler_arm.cc |
479 format: | 484 format: |
(...skipping 13 matching lines...) Expand all Loading... |
493 | 498 |
494 docs: | 499 docs: |
495 doxygen Doxyfile | 500 doxygen Doxyfile |
496 @echo See file://`pwd`/docs/html/index.html | 501 @echo See file://`pwd`/docs/html/index.html |
497 | 502 |
498 clean: | 503 clean: |
499 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 504 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
500 | 505 |
501 clean-all: clean | 506 clean-all: clean |
502 rm -rf build/ docs/ | 507 rm -rf build/ docs/ |
OLD | NEW |