Commit 23bee884 by Jim Stichnoth

Subzero: Improve the "make check-presubmit" target.

1. Include a test build (but no link) using g++, to identify errors and warnings before they hit the Windows bots. 2. Move "git diff --quiet" to the end so that the presubmit tests can easily be run before committing locally, if desired. 3. Add "make presubmit" as an alias for "make check-presubmit". 4. Document the individual steps. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1453713002 .
parent ccea793f
...@@ -299,7 +299,9 @@ make_symlink: $(OBJDIR)/pnacl-sz ...@@ -299,7 +299,9 @@ make_symlink: $(OBJDIR)/pnacl-sz
@echo "Build Attributes:" @echo "Build Attributes:"
@$(SHOW_BUILD_ATTS) @$(SHOW_BUILD_ATTS)
.PHONY: all make_symlink runtime bloat sb docs .PHONY: all compile_only make_symlink runtime bloat sb docs
compile_only: $(OBJS)
$(OBJDIR)/pnacl-sz: $(OBJS) $(OBJDIR)/pnacl-sz: $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \
...@@ -429,27 +431,43 @@ check-spec: $(ALLSPEC:=.spec2k) ...@@ -429,27 +431,43 @@ check-spec: $(ALLSPEC:=.spec2k)
check: check-lit check-unit check-xtest check: check-lit check-unit check-xtest
NPROCS := $(shell grep processor /proc/cpuinfo | wc -l) check-presubmit presubmit:
# Make sure clang-format gets run.
check-presubmit:
+make -f Makefile.standalone format +make -f Makefile.standalone format
git diff --quiet # Verify MINIMAL build, plus proper usage of REQUIRES in lit tests.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
MINIMAL=1 check MINIMAL=1 check
# Check the x86 assembler unit tests.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
DEBUG=1 CHECK_X86_ASM=1 check-unit DEBUG=1 CHECK_X86_ASM=1 check-unit
# Check that there are no g++ build errors or warnings.
+make -f Makefile.standalone clean
+make -f Makefile.standalone compile_only \
CXX=g++ STDLIB_FLAGS= \
LLVM_EXTRA_WARNINGS="-Wno-unknown-pragmas -Wno-unused-parameter \
-Wno-comment -Wno-enum-compare -Wno-strict-aliasing"
+make -f Makefile.standalone clean
# Run spec2k for x86-32.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
check check-spec check check-spec
# Build spec2k under -Om1/x86-32, to check for liveness errors.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec
# Run spec2k for x86-32 without advanced phi lowering.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
SPECFLAGS='--sz=--phi-edge-split=0' check-spec SPECFLAGS='--sz=--phi-edge-split=0' check-spec
# Build spec2k for arm32.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
TARGET=arm32 SPECBUILDONLY=true check-spec TARGET=arm32 SPECBUILDONLY=true check-spec
# Build spec2k under -Om1/arm32.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec TARGET=arm32 SPECFLAGS='-Om1' SPECBUILDONLY=true check-spec
# Run a few spec2k tests for arm32 using qemu.
+make -f Makefile.standalone \ +make -f Makefile.standalone \
TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec TARGET=arm32 ALLSPEC='176.gcc 181.mcf 254.gap' check-spec
# Verify that all changes are committed (including clang-format above).
git diff --quiet
# Provide validation of user awesomeness!
echo Success echo Success
FORMAT_BLACKLIST = FORMAT_BLACKLIST =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment