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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 | 292 |
| 293 # Creates symbolic link so that testing is easier. Also runs | 293 # Creates symbolic link so that testing is easier. Also runs |
| 294 # pnacl-sz to verify that the defines flags have valid values, | 294 # pnacl-sz to verify that the defines flags have valid values, |
| 295 # as well as describe the corresponding build attributes. | 295 # as well as describe the corresponding build attributes. |
| 296 make_symlink: $(OBJDIR)/pnacl-sz | 296 make_symlink: $(OBJDIR)/pnacl-sz |
| 297 rm -rf pnacl-sz | 297 rm -rf pnacl-sz |
| 298 ln -s $(OBJDIR)/pnacl-sz | 298 ln -s $(OBJDIR)/pnacl-sz |
| 299 @echo "Build Attributes:" | 299 @echo "Build Attributes:" |
| 300 @$(SHOW_BUILD_ATTS) | 300 @$(SHOW_BUILD_ATTS) |
| 301 | 301 |
| 302 .PHONY: all make_symlink runtime bloat sb docs | 302 .PHONY: all compile_only make_symlink runtime bloat sb docs |
| 303 | |
| 304 compile_only: $(OBJS) | |
| 303 | 305 |
| 304 $(OBJDIR)/pnacl-sz: $(OBJS) | 306 $(OBJDIR)/pnacl-sz: $(OBJS) |
| 305 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ | 307 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ |
| 306 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) | 308 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
| 307 | 309 |
| 308 $(SB_OBJDIR)/pnacl-sz.x86-32.nexe: $(SB_OBJS) | 310 $(SB_OBJDIR)/pnacl-sz.x86-32.nexe: $(SB_OBJS) |
| 309 $(eval PNACL_SZ_BASE := $(patsubst %.nexe, %, $@)) | 311 $(eval PNACL_SZ_BASE := $(patsubst %.nexe, %, $@)) |
| 310 $(SB_CXX) $(SB_LDFLAGS) -o $(PNACL_SZ_BASE).nonfinal.pexe $^ \ | 312 $(SB_CXX) $(SB_LDFLAGS) -o $(PNACL_SZ_BASE).nonfinal.pexe $^ \ |
| 311 $(SB_LLVM_LDFLAGS) | 313 $(SB_LLVM_LDFLAGS) |
| 312 $(SB_TRANSLATE) -arch x86-32 $(PNACL_SZ_BASE).nonfinal.pexe -o $@ \ | 314 $(SB_TRANSLATE) -arch x86-32 $(PNACL_SZ_BASE).nonfinal.pexe -o $@ \ |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 %.spec2k: % $(OBJDIR)/pnacl-sz make_symlink runtime | 424 %.spec2k: % $(OBJDIR)/pnacl-sz make_symlink runtime |
| 423 ./pydir/szbuild_spec2k.py -v --force \ | 425 ./pydir/szbuild_spec2k.py -v --force \ |
| 424 $(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $< | 426 $(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $< |
| 425 $(SPECBUILDONLY) || ( cd ../../../tests/spec2k; \ | 427 $(SPECBUILDONLY) || ( cd ../../../tests/spec2k; \ |
| 426 ./run_all.sh RunTimedBenchmarks $(SETUP) train $< ) | 428 ./run_all.sh RunTimedBenchmarks $(SETUP) train $< ) |
| 427 | 429 |
| 428 check-spec: $(ALLSPEC:=.spec2k) | 430 check-spec: $(ALLSPEC:=.spec2k) |
| 429 | 431 |
| 430 check: check-lit check-unit check-xtest | 432 check: check-lit check-unit check-xtest |
| 431 | 433 |
| 432 NPROCS := $(shell grep processor /proc/cpuinfo | wc -l) | 434 NPROCS := $(shell grep processor /proc/cpuinfo | wc -l) |
|
John
2015/11/17 14:06:11
Do you still need this?
Jim Stichnoth
2015/11/17 14:09:23
Good point! Done.
| |
| 433 | 435 |
| 434 check-presubmit: | 436 check-presubmit presubmit: |
| 437 # Make sure clang-format gets run. | |
| 435 +make -f Makefile.standalone format | 438 +make -f Makefile.standalone format |
| 436 » git diff --quiet | 439 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests. |
| 437 +make -f Makefile.standalone \ | 440 +make -f Makefile.standalone \ |
| 438 MINIMAL=1 check | 441 MINIMAL=1 check |
| 442 # Check the x86 assembler unit tests. | |
| 439 +make -f Makefile.standalone \ | 443 +make -f Makefile.standalone \ |
| 440 DEBUG=1 CHECK_X86_ASM=1 check-unit | 444 DEBUG=1 CHECK_X86_ASM=1 check-unit |
| 445 # Check that there are no g++ build errors or warnings. | |
| 446 +make -f Makefile.standalone clean | |
| 447 +make -f Makefile.standalone compile_only \ | |
| 448 CXX=g++ STDLIB_FLAGS= \ | |
| 449 LLVM_EXTRA_WARNINGS="-Wno-unknown-pragmas -Wno-unused-parameter \ | |
| 450 -Wno-comment -Wno-enum-compare -Wno-strict-aliasing" | |
| 451 +make -f Makefile.standalone clean | |
| 452 # Run spec2k for x86-32. | |
| 441 +make -f Makefile.standalone \ | 453 +make -f Makefile.standalone \ |
| 442 check check-spec | 454 check check-spec |
| 455 # Build spec2k under -Om1/x86-32, to check for liveness errors. | |
| 443 +make -f Makefile.standalone \ | 456 +make -f Makefile.standalone \ |
| 444 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | 457 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec |
| 458 # Run spec2k for x86-32 without advanced phi lowering. | |
| 445 +make -f Makefile.standalone \ | 459 +make -f Makefile.standalone \ |
| 446 SPECFLAGS='--sz=--phi-edge-split=0' check-spec | 460 SPECFLAGS='--sz=--phi-edge-split=0' check-spec |
| 461 # Build spec2k for arm32. | |
| 447 +make -f Makefile.standalone \ | 462 +make -f Makefile.standalone \ |
| 448 TARGET=arm32 SPECBUILDONLY=true check-spec | 463 TARGET=arm32 SPECBUILDONLY=true check-spec |
| 464 # Build spec2k under -Om1/arm32. | |
| 449 +make -f Makefile.standalone \ | 465 +make -f Makefile.standalone \ |
| 450 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec | 466 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec |
| 467 # Run a few spec2k tests for arm32 using qemu. | |
| 451 +make -f Makefile.standalone \ | 468 +make -f Makefile.standalone \ |
| 452 TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec | 469 TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec |
| 470 # Verify that all changes are committed (including clang-format above). | |
| 471 git diff --quiet | |
| 472 # Provide validation of user awesomeness! | |
| 453 echo Success | 473 echo Success |
| 454 | 474 |
| 455 FORMAT_BLACKLIST = | 475 FORMAT_BLACKLIST = |
| 456 # Add one of the following lines for each source file to ignore. | 476 # Add one of the following lines for each source file to ignore. |
| 457 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp | 477 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp |
| 458 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp | 478 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp |
| 459 FORMAT_BLACKLIST += ! -name assembler_arm.h | 479 FORMAT_BLACKLIST += ! -name assembler_arm.h |
| 460 FORMAT_BLACKLIST += ! -name assembler_arm.cc | 480 FORMAT_BLACKLIST += ! -name assembler_arm.cc |
| 461 format: | 481 format: |
| 462 $(CLANG_FORMAT_PATH)/clang-format -style=LLVM -i \ | 482 $(CLANG_FORMAT_PATH)/clang-format -style=LLVM -i \ |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 475 | 495 |
| 476 docs: | 496 docs: |
| 477 doxygen Doxyfile | 497 doxygen Doxyfile |
| 478 @echo See file://`pwd`/docs/html/index.html | 498 @echo See file://`pwd`/docs/html/index.html |
| 479 | 499 |
| 480 clean: | 500 clean: |
| 481 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 501 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
| 482 | 502 |
| 483 clean-all: clean | 503 clean-all: clean |
| 484 rm -rf build/ docs/ | 504 rm -rf build/ docs/ |
| OLD | NEW |