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

Side by Side Diff: Makefile.standalone

Issue 1582243005: allow specific test for make check (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: changes suggested by stichnot Created 4 years, 11 months 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
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 15 matching lines...) Expand all
26 # tools like qemu. 26 # tools like qemu.
27 TOOLCHAIN_ROOT ?= $(shell readlink -e $(NACL_ROOT)/toolchain/linux_x86) 27 TOOLCHAIN_ROOT ?= $(shell readlink -e $(NACL_ROOT)/toolchain/linux_x86)
28 28
29 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. 29 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain.
30 # This is used as the default root for finding binutils, libcxx, etc. 30 # This is used as the default root for finding binutils, libcxx, etc.
31 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e $(TOOLCHAIN_ROOT)/pnacl_newlib_raw) 31 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e $(TOOLCHAIN_ROOT)/pnacl_newlib_raw)
32 32
33 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.). 33 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.).
34 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin) 34 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin)
35 35
36 # Allow tests_lit to be overidden
37 CHECK_LIT_TESTS ?= tests_lit
38 CHECK_XTEST_TESTS ?= crosstest/Output
39
36 # Hack to auto-detect autoconf versus cmake build of LLVM. If the LLVM tools 40 # Hack to auto-detect autoconf versus cmake build of LLVM. If the LLVM tools
37 # were dynamically linked with something like libLLVM-3.7svn.so, it is an 41 # were dynamically linked with something like libLLVM-3.7svn.so, it is an
38 # autoconf build, otherwise it is a cmake build. AUTOCONF is set to 0 for 42 # autoconf build, otherwise it is a cmake build. AUTOCONF is set to 0 for
39 # cmake, nonzero for autoconf. 43 # cmake, nonzero for autoconf.
40 AUTOCONF ?= $(shell ldd $(PNACL_BIN_PATH)/opt | grep -c libLLVM-) 44 AUTOCONF ?= $(shell ldd $(PNACL_BIN_PATH)/opt | grep -c libLLVM-)
41 45
42 # CLANG_PATH is the location of the clang compiler to use for building 46 # CLANG_PATH is the location of the clang compiler to use for building
43 # the host binaries. 47 # the host binaries.
44 CLANG_PATH ?= $(shell readlink -e \ 48 CLANG_PATH ?= $(shell readlink -e \
45 $(NACL_ROOT)/../third_party/llvm-build/Release+Asserts/bin) 49 $(NACL_ROOT)/../third_party/llvm-build/Release+Asserts/bin)
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 331
328 # Creates symbolic link so that testing is easier. Also runs 332 # Creates symbolic link so that testing is easier. Also runs
329 # pnacl-sz to verify that the defines flags have valid values, 333 # pnacl-sz to verify that the defines flags have valid values,
330 # as well as describe the corresponding build attributes. 334 # as well as describe the corresponding build attributes.
331 make_symlink: $(OBJDIR)/pnacl-sz 335 make_symlink: $(OBJDIR)/pnacl-sz
332 rm -rf pnacl-sz 336 rm -rf pnacl-sz
333 ln -s $(OBJDIR)/pnacl-sz 337 ln -s $(OBJDIR)/pnacl-sz
334 @echo "Build Attributes:" 338 @echo "Build Attributes:"
335 @$(SHOW_BUILD_ATTS) 339 @$(SHOW_BUILD_ATTS)
336 340
337 .PHONY: all compile_only make_symlink runtime bloat sb docs 341 .PHONY: all compile_only make_symlink runtime bloat sb docs help \
342 help-check-lit help-check-xtest
338 343
339 compile_only: $(OBJS) 344 compile_only: $(OBJS)
340 345
341 $(OBJDIR)/pnacl-sz: $(OBJS) 346 $(OBJDIR)/pnacl-sz: $(OBJS)
342 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ 347 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \
343 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) 348 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
344 349
345 $(SB_OBJDIR)/pnacl-sz.x86-32.nexe: $(SB_OBJS) 350 $(SB_OBJDIR)/pnacl-sz.x86-32.nexe: $(SB_OBJS)
346 $(eval PNACL_SZ_BASE := $(patsubst %.nexe, %, $@)) 351 $(eval PNACL_SZ_BASE := $(patsubst %.nexe, %, $@))
347 $(SB_CXX) $(SB_LDFLAGS) -o $(PNACL_SZ_BASE).nonfinal.pexe $^ \ 352 $(SB_CXX) $(SB_LDFLAGS) -o $(PNACL_SZ_BASE).nonfinal.pexe $^ \
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 # Use runtime.is.built so that build-runtime.py is invoked only once 413 # Use runtime.is.built so that build-runtime.py is invoked only once
409 # even in a parallel build. 414 # even in a parallel build.
410 .INTERMEDIATE: runtime.is.built 415 .INTERMEDIATE: runtime.is.built
411 $(RT_OBJ): runtime.is.built 416 $(RT_OBJ): runtime.is.built
412 runtime.is.built: $(RT_SRC) pydir/build-runtime.py 417 runtime.is.built: $(RT_SRC) pydir/build-runtime.py
413 @echo ================ Building Subzero runtime ================ 418 @echo ================ Building Subzero runtime ================
414 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT) 419 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT)
415 420
416 check-lit: $(OBJDIR)/pnacl-sz make_symlink 421 check-lit: $(OBJDIR)/pnacl-sz make_symlink
417 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ 422 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \
418 » $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit \ 423 » $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_LIT_TESTS) \
419 $(FORCEASM_LIT_TEST_EXCLUDES) $(FORCEASM_LIT_PARAM) 424 $(FORCEASM_LIT_TEST_EXCLUDES) $(FORCEASM_LIT_PARAM)
420 425
421 ifdef MINIMAL 426 ifdef MINIMAL
422 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime 427 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime
423 @echo "Crosstests disabled, minimal build" 428 @echo "Crosstests disabled, minimal build"
424 else 429 else
425 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime 430 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime
426 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. 431 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1.
427 # For (slow) sandboxed tests, limit to Om1/sse4.1. 432 # For (slow) sandboxed tests, limit to Om1/sse4.1.
428 ./pydir/crosstest_generator.py -v --lit \ 433 ./pydir/crosstest_generator.py -v --lit \
429 --toolchain-root $(TOOLCHAIN_ROOT) \ 434 --toolchain-root $(TOOLCHAIN_ROOT) \
430 $(FORCEASM_FLAG) \ 435 $(FORCEASM_FLAG) \
431 $(FORCEASM_XTEST_EXCLUDES) \ 436 $(FORCEASM_XTEST_EXCLUDES) \
432 -i x8632,native,sse2 \ 437 -i x8632,native,sse2 \
433 -i x8632,native,sse4.1,test_vector_ops \ 438 -i x8632,native,sse4.1,test_vector_ops \
434 -i x8632,sandbox,sse4.1,Om1 \ 439 -i x8632,sandbox,sse4.1,Om1 \
435 -i x8632,nonsfi,sse2,O2 \ 440 -i x8632,nonsfi,sse2,O2 \
436 -i x8664,native,sse2 \ 441 -i x8664,native,sse2 \
437 -i x8664,native,sse4.1,test_vector_ops \ 442 -i x8664,native,sse4.1,test_vector_ops \
438 -i x8664,sandbox,sse4.1,Om1 \ 443 -i x8664,sandbox,sse4.1,Om1 \
439 -i arm32,neon \ 444 -i arm32,neon \
440 -e arm32,nonsfi \ 445 -e arm32,nonsfi \
441 -e arm32,neon,test_vector_ops \ 446 -e arm32,neon,test_vector_ops \
442 -e arm32,neon,test_select 447 -e arm32,neon,test_select
443 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ 448 PNACL_BIN_PATH=$(PNACL_BIN_PATH) \
444 » $(LLVM_SRC_PATH)/utils/lit/lit.py -sv crosstest/Output 449 » $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_XTEST_TESTS)
445 endif 450 endif
446 451
447 check-unit: $(OBJDIR)/run_unittests 452 check-unit: $(OBJDIR)/run_unittests
448 $(OBJDIR)/run_unittests 453 $(OBJDIR)/run_unittests
449 454
450 # List the spec2k components in roughly reverse order of runtime, to help with 455 # List the spec2k components in roughly reverse order of runtime, to help with
451 # parallel execution speed. 456 # parallel execution speed.
452 ALLSPEC := 253.perlbmk 177.mesa 188.ammp 256.bzip2 164.gzip 179.art 183.equake \ 457 ALLSPEC := 253.perlbmk 177.mesa 188.ammp 256.bzip2 164.gzip 179.art 183.equake \
453 175.vpr 176.gcc 181.mcf 186.crafty 197.parser 254.gap 255.vortex \ 458 175.vpr 176.gcc 181.mcf 186.crafty 197.parser 254.gap 255.vortex \
454 300.twolf 252.eon 459 300.twolf 252.eon
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 -p1 -style=LLVM -i 550 -p1 -style=LLVM -i
546 551
547 bloat: make_symlink 552 bloat: make_symlink
548 nm -C -S -l pnacl-sz | \ 553 nm -C -S -l pnacl-sz | \
549 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json 554 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json
550 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html 555 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html
551 556
552 docs: 557 docs:
553 make -C docs -f Makefile.standalone 558 make -C docs -f Makefile.standalone
554 559
560 help:
561 @cat Makefile.standalone-help/help.txt
562
563 help-check-lit:
564 @cat Makefile.standalone-help/check-lit.txt
565
566 help-check-xtest:
567 @cat Makefile.standalone-help/check-xtest.txt
568
555 clean: 569 clean:
556 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json 570 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json
557 571
558 clean-all: clean 572 clean-all: clean
559 rm -rf build/ crosstest/Output/ 573 rm -rf build/ crosstest/Output/
OLDNEW
« no previous file with comments | « no previous file | Makefile.standalone-help/check-lit.txt » ('j') | Makefile.standalone-help/check-lit.txt » ('J')

Powered by Google App Engine
This is Rietveld 408576698