Commit 2e7de236 by Jim Stichnoth

Subzero: Add a "make check-spec" target.

"make -f Makefile.standalone check-spec" will translate and run all the spec2k components for a given target. The advantages are that this can be done all within the subzero directory, and the spec components can be run in parallel via "make -j" (particularly helpful for arm32/qemu). Default target is x8632, and arm32 is also available. Example: make -j32 -f Makefile.standalone check-spec TARGET=arm32 SPEC="-O2 --filetype=iasm" Also removes unnecessary tab characters from the makefile, fixes >80-column lines, and gives more consistent indentation. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1413033009 .
parent 8686139f
...@@ -98,13 +98,15 @@ endif ...@@ -98,13 +98,15 @@ endif
ifdef UBSAN ifdef UBSAN
OBJDIR := $(OBJDIR)+UBSan OBJDIR := $(OBJDIR)+UBSan
CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr -fno-sanitize=nonnull-attribute CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr \
-fno-sanitize=nonnull-attribute
LD_EXTRA += -fsanitize=undefined LD_EXTRA += -fsanitize=undefined
endif endif
ifdef UBSAN_TRAP ifdef UBSAN_TRAP
OBJDIR := $(OBJDIR)+UBSan_Trap OBJDIR := $(OBJDIR)+UBSan_Trap
CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -fno-sanitize=vptr -fno-sanitize=nonnull-attribute CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error \
-fno-sanitize=vptr -fno-sanitize=nonnull-attribute
LD_EXTRA += -fsanitize=undefined-trap LD_EXTRA += -fsanitize=undefined-trap
endif endif
...@@ -233,7 +235,8 @@ SRCS = \ ...@@ -233,7 +235,8 @@ SRCS = \
PNaClTranslator.cpp PNaClTranslator.cpp
ifndef MINIMAL ifndef MINIMAL
SRCS += IceConverter.cpp \ SRCS += \
IceConverter.cpp \
IceTypeConverter.cpp IceTypeConverter.cpp
endif endif
...@@ -248,9 +251,9 @@ UNITTEST_SRCS = \ ...@@ -248,9 +251,9 @@ UNITTEST_SRCS = \
# The X86 assembler tests take too long to compile. Given how infrequently the # The X86 assembler tests take too long to compile. Given how infrequently the
# assembler will change, we disable them. # assembler will change, we disable them.
ifdef CHECK_X86_ASM ifdef CHECK_X86_ASM
ifndef DEBUG ifndef DEBUG
$(error Run check-unit with DEBUG=1 lest your machine perish) $(error Run check-unit with DEBUG=1 lest your machine perish)
endif endif
UNITTEST_SRCS += AssemblerX8632/LowLevel.cpp \ UNITTEST_SRCS += AssemblerX8632/LowLevel.cpp \
AssemblerX8632/DataMov.cpp \ AssemblerX8632/DataMov.cpp \
AssemblerX8632/Locked.cpp \ AssemblerX8632/Locked.cpp \
...@@ -319,8 +322,8 @@ $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS) ...@@ -319,8 +322,8 @@ $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS)
-lgtest -lgtest_main -ldl \ -lgtest -lgtest_main -ldl \
-Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
$(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \ $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp unittest/*.h \
unittest/*.h src/*.h src/*.def src/*.h src/*.def
$(CXX) -c $(CXXFLAGS) \ $(CXX) -c $(CXXFLAGS) \
-Isrc/ \ -Isrc/ \
-Iunittest/ \ -Iunittest/ \
...@@ -332,7 +335,8 @@ $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \ ...@@ -332,7 +335,8 @@ $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \
$(OBJS): | $(OBJDIR) $(OBJS): | $(OBJDIR)
$(SB_OBJS): | $(SB_OBJDIR) $(SB_OBJS): | $(SB_OBJDIR)
$(UNITTEST_OBJS): | $(OBJDIR)/unittest $(OBJDIR)/unittest/AssemblerX8632 $(OBJDIR)/unittest/AssemblerX8664 $(UNITTEST_OBJS): | $(OBJDIR)/unittest $(OBJDIR)/unittest/AssemblerX8632 \
$(OBJDIR)/unittest/AssemblerX8664
$(OBJDIR): $(OBJDIR):
@mkdir -p $@ @mkdir -p $@
...@@ -393,6 +397,30 @@ endif ...@@ -393,6 +397,30 @@ endif
check-unit: $(OBJDIR)/run_unittests check-unit: $(OBJDIR)/run_unittests
$(OBJDIR)/run_unittests $(OBJDIR)/run_unittests
ALLSPEC := 177.mesa 179.art 183.equake 188.ammp 164.gzip 175.vpr 176.gcc \
181.mcf 186.crafty 197.parser 253.perlbmk 254.gap 255.vortex \
256.bzip2 300.twolf 252.eon
.PHONY: $(ALLSPEC)
TARGET := x8632
ifeq ($(TARGET),x8632)
TARGETFLAG=x8632
SETUP=SetupGccX8632Opt
SPEC := -O2 --filetype=obj
endif
ifeq ($(TARGET),arm32)
TARGETFLAG=arm32
SETUP=SetupGccArmOpt
SPEC := -O2 --filetype=asm
endif
%.spec2k: %
./pydir/szbuild_spec2k.py -v --force --target=$(TARGETFLAG) $(SPEC) $<
( cd ../../../tests/spec2k; \
./run_all.sh RunTimedBenchmarks $(SETUP) train $< )
check-spec: $(OBJDIR)/pnacl-sz make_symlink $(ALLSPEC:=.spec2k)
check: check-lit check-unit check-xtest check: check-lit check-unit check-xtest
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