Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: Makefile.standalone

Issue 1453713002: Subzero: Improve the "make check-presubmit" target. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove NPROCS Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 check-presubmit presubmit:
433 435 # Make sure clang-format gets run.
434 check-presubmit:
435 +make -f Makefile.standalone format 436 +make -f Makefile.standalone format
436 » git diff --quiet 437 # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests.
437 +make -f Makefile.standalone \ 438 +make -f Makefile.standalone \
438 MINIMAL=1 check 439 MINIMAL=1 check
440 # Check the x86 assembler unit tests.
439 +make -f Makefile.standalone \ 441 +make -f Makefile.standalone \
440 DEBUG=1 CHECK_X86_ASM=1 check-unit 442 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.
441 +make -f Makefile.standalone \ 451 +make -f Makefile.standalone \
442 check check-spec 452 check check-spec
453 # Build spec2k under -Om1/x86-32, to check for liveness errors.
443 +make -f Makefile.standalone \ 454 +make -f Makefile.standalone \
444 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec 455 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec
456 # Run spec2k for x86-32 without advanced phi lowering.
445 +make -f Makefile.standalone \ 457 +make -f Makefile.standalone \
446 SPECFLAGS='--sz=--phi-edge-split=0' check-spec 458 SPECFLAGS='--sz=--phi-edge-split=0' check-spec
459 # Build spec2k for arm32.
447 +make -f Makefile.standalone \ 460 +make -f Makefile.standalone \
448 TARGET=arm32 SPECBUILDONLY=true check-spec 461 TARGET=arm32 SPECBUILDONLY=true check-spec
462 # Build spec2k under -Om1/arm32.
449 +make -f Makefile.standalone \ 463 +make -f Makefile.standalone \
450 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec 464 TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec
465 # Run a few spec2k tests for arm32 using qemu.
451 +make -f Makefile.standalone \ 466 +make -f Makefile.standalone \
452 TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec 467 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!
453 echo Success 471 echo Success
454 472
455 FORMAT_BLACKLIST = 473 FORMAT_BLACKLIST =
456 # Add one of the following lines for each source file to ignore. 474 # Add one of the following lines for each source file to ignore.
457 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp 475 FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp
458 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp 476 FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp
459 FORMAT_BLACKLIST += ! -name assembler_arm.h 477 FORMAT_BLACKLIST += ! -name assembler_arm.h
460 FORMAT_BLACKLIST += ! -name assembler_arm.cc 478 FORMAT_BLACKLIST += ! -name assembler_arm.cc
461 format: 479 format:
462 $(CLANG_FORMAT_PATH)/clang-format -style=LLVM -i \ 480 $(CLANG_FORMAT_PATH)/clang-format -style=LLVM -i \
(...skipping 12 matching lines...) Expand all
475 493
476 docs: 494 docs:
477 doxygen Doxyfile 495 doxygen Doxyfile
478 @echo See file://`pwd`/docs/html/index.html 496 @echo See file://`pwd`/docs/html/index.html
479 497
480 clean: 498 clean:
481 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json 499 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json
482 500
483 clean-all: clean 501 clean-all: clean
484 rm -rf build/ docs/ 502 rm -rf build/ docs/
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698