| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ | 258 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ |
| 259 $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA) -MP -MD -Werror | 259 $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA) -MP -MD -Werror |
| 260 | 260 |
| 261 ifdef WASM | 261 ifdef WASM |
| 262 BASE_CXXFLAGS := $(BASE_CXXFLAGS) $(V8_CXXFLAGS) -DALLOW_WASM=1 | 262 BASE_CXXFLAGS := $(BASE_CXXFLAGS) $(V8_CXXFLAGS) -DALLOW_WASM=1 |
| 263 OBJDIR := $(OBJDIR)+Wasm | 263 OBJDIR := $(OBJDIR)+Wasm |
| 264 else | 264 else |
| 265 BASE_CXXFLAGS := $(BASE_CXXFLAGS) -DALLOW_WASM=0 | 265 BASE_CXXFLAGS := $(BASE_CXXFLAGS) -DALLOW_WASM=0 |
| 266 endif | 266 endif |
| 267 | 267 |
| 268 # TODO(stichnot,jpp): Restructure static fields in template classes to avoid |
| 269 # needing -Wno-undefined-var-template . |
| 268 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ | 270 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ |
| 269 $(STDLIB_FLAGS) | 271 $(STDLIB_FLAGS) -Wno-undefined-var-template |
| 270 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(BASE_CXX_DEFINES) \ | 272 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(BASE_CXX_DEFINES) \ |
| 271 -Wno-unknown-pragmas -I$(NACL_ROOT) -I$(NACL_ROOT)/.. | 273 -Wno-unknown-pragmas -I$(NACL_ROOT) -I$(NACL_ROOT)/.. |
| 272 | 274 |
| 273 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ | 275 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ |
| 274 $(LD_EXTRA) $(STDLIB_FLAGS) | 276 $(LD_EXTRA) $(STDLIB_FLAGS) |
| 275 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. | 277 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. |
| 276 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) | 278 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) |
| 277 | 279 |
| 278 # List the target-specific source files first, which generally take longer to | 280 # List the target-specific source files first, which generally take longer to |
| 279 # compile, in the hope of improving parallel build time. | 281 # compile, in the hope of improving parallel build time. |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 NONSFI_LOADER_X8632 = \ | 609 NONSFI_LOADER_X8632 = \ |
| 608 $(NACL_ROOT)/scons-out/opt-linux-x86-32/obj/src/nonsfi/loader/nonsfi_loader | 610 $(NACL_ROOT)/scons-out/opt-linux-x86-32/obj/src/nonsfi/loader/nonsfi_loader |
| 609 NONSFI_LOADER_ARM32 = \ | 611 NONSFI_LOADER_ARM32 = \ |
| 610 $(NACL_ROOT)/scons-out/opt-linux-arm/obj/src/nonsfi/loader/nonsfi_loader | 612 $(NACL_ROOT)/scons-out/opt-linux-arm/obj/src/nonsfi/loader/nonsfi_loader |
| 611 SBTC_LIBFILE = $(SB_LLVM_PATH)/lib/libLLVMSupport.a | 613 SBTC_LIBFILE = $(SB_LLVM_PATH)/lib/libLLVMSupport.a |
| 612 SPEC_SAMPLE_PEXE = $(NACL_ROOT)/tests/spec2k/176.gcc/gcc.opt.stripped.pexe | 614 SPEC_SAMPLE_PEXE = $(NACL_ROOT)/tests/spec2k/176.gcc/gcc.opt.stripped.pexe |
| 613 | 615 |
| 614 exists-nonsfi-x8632: | 616 exists-nonsfi-x8632: |
| 615 @if [ ! -f $(NONSFI_LOADER_X8632) ] ; then \ | 617 @if [ ! -f $(NONSFI_LOADER_X8632) ] ; then \ |
| 616 echo "Missing file $(NONSFI_LOADER_X8632)"; \ | 618 echo "Missing file $(NONSFI_LOADER_X8632)"; \ |
| 617 echo "Consider running 'scons nonsfi_loader'" \ | 619 echo "Consider running './scons nonsfi_loader'" \ |
| 618 "in the native_client directory."; \ | 620 "in the native_client directory."; \ |
| 619 exit 1 ; \ | 621 exit 1 ; \ |
| 620 fi | 622 fi |
| 621 | 623 |
| 622 exists-nonsfi-arm32: | 624 exists-nonsfi-arm32: |
| 623 @if [ ! -f $(NONSFI_LOADER_ARM32) ] ; then \ | 625 @if [ ! -f $(NONSFI_LOADER_ARM32) ] ; then \ |
| 624 echo "Missing file $(NONSFI_LOADER_ARM32)"; \ | 626 echo "Missing file $(NONSFI_LOADER_ARM32)"; \ |
| 625 echo "Consider running 'scons platform=arm32 nonsfi_loader'" \ | 627 echo "Consider running './scons platform=arm nonsfi_loader'" \ |
| 626 "in the native_client directory."; \ | 628 "in the native_client directory."; \ |
| 627 exit 1 ; \ | 629 exit 1 ; \ |
| 628 fi | 630 fi |
| 629 | 631 |
| 630 exists-sbtc: | 632 exists-sbtc: |
| 631 @if [ ! -f $(SBTC_LIBFILE) ] ; then \ | 633 @if [ ! -f $(SBTC_LIBFILE) ] ; then \ |
| 632 echo "Missing file $(SBTC_LIBFILE)"; \ | 634 echo "Missing file $(SBTC_LIBFILE)"; \ |
| 633 echo "Consider running 'toolchain_build_pnacl.py --build-sbtc'."; \ | 635 echo "Consider running 'toolchain_build_pnacl.py --build-sbtc'."; \ |
| 634 exit 1 ; \ | 636 exit 1 ; \ |
| 635 fi | 637 fi |
| 636 | 638 |
| 637 exists-spec: | 639 exists-spec: |
| 638 @if [ ! -f $(SPEC_SAMPLE_PEXE) ] ; then \ | 640 @if [ ! -f $(SPEC_SAMPLE_PEXE) ] ; then \ |
| 639 echo "Missing file $(SPEC_SAMPLE_PEXE)"; \ | 641 echo "Missing file $(SPEC_SAMPLE_PEXE)"; \ |
| 640 echo "Consider running" \ | 642 echo "Consider running" \ |
| 641 "'run_all.sh BuildBenchmarks 0 SetupPnaclX8632Opt'" \ | 643 "'./run_all.sh BuildBenchmarks 0 SetupPnaclX8632Opt'" \ |
| 642 "in the native_client/tests/spec2k directory."; \ | 644 "in the native_client/tests/spec2k directory."; \ |
| 643 exit 1 ; \ | 645 exit 1 ; \ |
| 644 fi | 646 fi |
| 645 | 647 |
| 646 check-presubmit presubmit: exists-nonsfi-x8632 exists-nonsfi-arm32 \ | 648 check-presubmit presubmit: exists-nonsfi-x8632 exists-nonsfi-arm32 \ |
| 647 exists-sbtc exists-spec | 649 exists-sbtc exists-spec |
| 648 # Make sure clang-format gets run. | 650 # Make sure clang-format gets run. |
| 649 +make -f Makefile.standalone format | 651 +make -f Makefile.standalone format |
| 650 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. | 652 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. |
| 651 +make -f Makefile.standalone \ | 653 +make -f Makefile.standalone \ |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 | 773 |
| 772 help-check-xtest: | 774 help-check-xtest: |
| 773 @cat Makefile.standalone-help/check-xtest.txt | 775 @cat Makefile.standalone-help/check-xtest.txt |
| 774 | 776 |
| 775 clean: | 777 clean: |
| 776 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ | 778 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ |
| 777 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json | 779 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json |
| 778 | 780 |
| 779 clean-all: clean | 781 clean-all: clean |
| 780 rm -rf build/ crosstest/Output/ | 782 rm -rf build/ crosstest/Output/ |
| OLD | NEW |