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
ifdef 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
endif
ifdef 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
endif
......@@ -233,7 +235,8 @@ SRCS = \
PNaClTranslator.cpp
ifndef MINIMAL
SRCS += IceConverter.cpp \
SRCS += \
IceConverter.cpp \
IceTypeConverter.cpp
endif
......@@ -248,9 +251,9 @@ UNITTEST_SRCS = \
# The X86 assembler tests take too long to compile. Given how infrequently the
# assembler will change, we disable them.
ifdef CHECK_X86_ASM
ifndef DEBUG
$(error Run check-unit with DEBUG=1 lest your machine perish)
endif
ifndef DEBUG
$(error Run check-unit with DEBUG=1 lest your machine perish)
endif
UNITTEST_SRCS += AssemblerX8632/LowLevel.cpp \
AssemblerX8632/DataMov.cpp \
AssemblerX8632/Locked.cpp \
......@@ -319,8 +322,8 @@ $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS)
-lgtest -lgtest_main -ldl \
-Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
$(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \
unittest/*.h src/*.h src/*.def
$(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp unittest/*.h \
src/*.h src/*.def
$(CXX) -c $(CXXFLAGS) \
-Isrc/ \
-Iunittest/ \
......@@ -332,7 +335,8 @@ $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \
$(OBJS): | $(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):
@mkdir -p $@
......@@ -393,6 +397,30 @@ endif
check-unit: $(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
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