[llvm-commits] [test-suite] r105334 - in /test-suite/trunk: Makefile.config.in Makefile.programs Makefile.rules Makefile.tests TEST.dbgopt.Makefile TEST.ipodbgopt.Makefile TEST.llcdbg.Makefile TEST.m2regllcdbg.Makefile TEST.optllcdbg.Makefile
Jim Grosbach
grosbach at apple.com
Wed Jun 2 10:49:43 PDT 2010
Author: grosbach
Date: Wed Jun 2 12:49:43 2010
New Revision: 105334
URL: http://llvm.org/viewvc/llvm-project?rev=105334&view=rev
Log:
Allow setting of TARGET_FLAGS on the make command line, as is done for the
nightly test target. Allows using other test targets for ARM more
effectively.
Modified:
test-suite/trunk/Makefile.config.in
test-suite/trunk/Makefile.programs
test-suite/trunk/Makefile.rules
test-suite/trunk/Makefile.tests
test-suite/trunk/TEST.dbgopt.Makefile
test-suite/trunk/TEST.ipodbgopt.Makefile
test-suite/trunk/TEST.llcdbg.Makefile
test-suite/trunk/TEST.m2regllcdbg.Makefile
test-suite/trunk/TEST.optllcdbg.Makefile
Modified: test-suite/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.config.in?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/Makefile.config.in (original)
+++ test-suite/trunk/Makefile.config.in Wed Jun 2 12:49:43 2010
@@ -60,7 +60,7 @@
endif
ifeq ($(ARCH),THUMB)
-TARGET_FLAGS += -mthumb
+TEST_TARGET_FLAGS += -mthumb
endif
#
Modified: test-suite/trunk/Makefile.programs
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/Makefile.programs (original)
+++ test-suite/trunk/Makefile.programs Wed Jun 2 12:49:43 2010
@@ -410,7 +410,7 @@
$(PROGRAMS_TO_TEST:%=Output/%.cbe): \
Output/%.cbe: Output/%.cbe.c
- -$(RUNTOOLSAFELY) $(CC) $< -o $@ $(LDFLAGS) $(CFLAGS) $(OPTFLAGS) -fno-strict-aliasing -fno-inline $(TARGET_FLAGS) $(LIBS)
+ -$(RUNTOOLSAFELY) $(CC) $< -o $@ $(LDFLAGS) $(CFLAGS) $(OPTFLAGS) -fno-strict-aliasing -fno-inline $(X_TARGET_FLAGS) $(LIBS)
#
# Compile a linked program to machine code with LLC.
@@ -461,15 +461,15 @@
# Link an LLVM-linked program using the system linker.
$(PROGRAMS_TO_TEST:%=Output/%.llc): \
Output/%.llc: Output/%.llc.o
- -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS)
+ -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(X_TARGET_FLAGS) $(LDFLAGS)
$(PROGRAMS_TO_TEST:%=Output/%.llc-beta): \
Output/%.llc-beta: Output/%.llc-beta.o
- -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS)
+ -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(X_TARGET_FLAGS) $(LDFLAGS)
$(PROGRAMS_TO_TEST:%=Output/%.opt-beta): \
Output/%.opt-beta: Output/%.opt-beta.o
- -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS)
+ -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(X_TARGET_FLAGS) $(LDFLAGS)
else
@@ -477,15 +477,15 @@
#
$(PROGRAMS_TO_TEST:%=Output/%.llc): \
Output/%.llc: Output/%.llc.s
- -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS)
+ -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(X_TARGET_FLAGS) $(LDFLAGS)
$(PROGRAMS_TO_TEST:%=Output/%.llc-beta): \
Output/%.llc-beta: Output/%.llc-beta.s
- -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS)
+ -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(X_TARGET_FLAGS) $(LDFLAGS)
$(PROGRAMS_TO_TEST:%=Output/%.opt-beta): \
Output/%.opt-beta: Output/%.opt-beta.s
- -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS)
+ -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(X_TARGET_FLAGS) $(LDFLAGS)
endif
Modified: test-suite/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/Makefile.rules (original)
+++ test-suite/trunk/Makefile.rules Wed Jun 2 12:49:43 2010
@@ -356,11 +356,11 @@
# Explicitly specify -m32 / -m64 so there is no mismatch between llvm-gcc
# default and system compiler default.
ifeq ($(ARCH),x86)
-TARGET_FLAGS += -m32
+TEST_TARGET_FLAGS += -m32
endif
ifeq ($(ARCH),x86_64)
-TARGET_FLAGS += -m64
+TEST_TARGET_FLAGS += -m64
endif
ifeq ($(ARCH),Alpha)
@@ -381,14 +381,14 @@
TARGET_LLIFLAGS += -code-model=small
endif
else
-TARGET_FLAGS += -fomit-frame-pointer
+TEST_TARGET_FLAGS += -fomit-frame-pointer
ifeq ($(TARGET_OS),Darwin)
- TARGET_FLAGS += -mdynamic-no-pic
+ TEST_TARGET_FLAGS += -mdynamic-no-pic
endif
endif
ifdef EXTRA_OPTIONS
-TARGET_FLAGS += $(EXTRA_OPTIONS)
+TEST_TARGET_FLAGS += $(EXTRA_OPTIONS)
endif
ifdef SMALL_PROBLEM_SIZE
Modified: test-suite/trunk/Makefile.tests
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.tests?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/Makefile.tests (original)
+++ test-suite/trunk/Makefile.tests Wed Jun 2 12:49:43 2010
@@ -18,6 +18,11 @@
include ${LEVEL}/Makefile.common
+# TARGET_FLAGS can come in from the command line, and tests may add to them,
+# so use an internal target name to combine them. Just using += to add to
+# TARGET_FLAGS in the TEST.* makefiles doesn't work out.
+X_TARGET_FLAGS = $(TARGET_FLAGS) $(TEST_TARGET_FLAGS)
+
STATS = -stats -time-passes
.PHONY: clean default
@@ -39,27 +44,27 @@
# Compile from X.c to Output/X.bc
Output/%.bc: %.c $(LCC_PROGRAMS) Output/.dir $(INCLUDES)
- -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -c $< -o $@ -emit-llvm
# Compile from X.cpp to Output/X.bc
Output/%.bc: %.cpp $(LCC_PROGRAMS) Output/.dir $(INCLUDES)
- -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -c $< -o $@ -emit-llvm
# Compile from X.cc to Output/X.bc
Output/%.bc: %.cc $(LCC_PROGRAMS) Output/.dir $(INCLUDES)
- -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -c $< -o $@ -emit-llvm
# Compile from X.C to Output/X.bc
Output/%.bc: %.C $(LCC_PROGRAMS) Output/.dir $(INCLUDES)
- -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -c $< -o $@ -emit-llvm
# Compile from X.m to Output/X.bc
Output/%.bc: %.m $(LCC_PROGRAMS) Output/.dir $(INCLUDES)
- -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -c $< -o $@ -emit-llvm
# Compile from X.mm to Output/X.bc
Output/%.bc: %.mm $(LCC_PROGRAMS) Output/.dir $(INCLUDES)
- -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -c $< -o $@ -emit-llvm
# LLVM Assemble from X.ll to Output/X.bc. Because we are coming directly from
# LLVM source, use the non-transforming assembler.
Modified: test-suite/trunk/TEST.dbgopt.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.dbgopt.Makefile?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/TEST.dbgopt.Makefile (original)
+++ test-suite/trunk/TEST.dbgopt.Makefile Wed Jun 2 12:49:43 2010
@@ -16,8 +16,8 @@
test.$(TEST).%: Output/%.diff
Output/%.s: %.c Output/.dir $(INCLUDES)
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.c -o Output/$*.first.s
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.c -o Output/$*.second.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.c -o Output/$*.first.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.c -o Output/$*.second.s
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
echo "--------- TEST-PASS: $*"; \
else \
@@ -25,8 +25,8 @@
fi
Output/%.s: %.cpp Output/.dir $(INCLUDES)
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.cpp -o Output/$*.first.s
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.cpp -o Output/$*.second.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.cpp -o Output/$*.first.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.cpp -o Output/$*.second.s
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
echo "--------- TEST-PASS: $*"; \
else \
@@ -34,8 +34,8 @@
fi
Output/%.s: %.cc Output/.dir $(INCLUDES)
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.cc -o Output/$*.first.s
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.cc -o Output/$*.second.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.cc -o Output/$*.first.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.cc -o Output/$*.second.s
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
echo "--------- TEST-PASS: $*"; \
else \
@@ -43,8 +43,8 @@
fi
Output/%.s: %.m Output/.dir $(INCLUDES)
- -$(LLVMGCC) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.m -o Output/$*.first.s
- -$(LLVMGCC) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.m -o Output/$*.second.s
+ -$(LLVMGCC) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.m -o Output/$*.first.s
+ -$(LLVMGCC) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.m -o Output/$*.second.s
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
echo "--------- TEST-PASS: $*"; \
else \
@@ -52,8 +52,8 @@
fi
Output/%.s: %.mm Output/.dir $(INCLUDES)
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.mm -o Output/$*.first.s
- -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.mm -o Output/$*.second.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -g -Os -fdebug-disable-debug-info-print -S ${PROJ_SRC_DIR}/$*.mm -o Output/$*.first.s
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S ${PROJ_SRC_DIR}/$*.mm -o Output/$*.second.s
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
echo "--------- TEST-PASS: $*"; \
else \
Modified: test-suite/trunk/TEST.ipodbgopt.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.ipodbgopt.Makefile?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/TEST.ipodbgopt.Makefile (original)
+++ test-suite/trunk/TEST.ipodbgopt.Makefile Wed Jun 2 12:49:43 2010
@@ -13,7 +13,7 @@
##===----------------------------------------------------------------------===##
TESTNAME = $*
-TARGET_FLAGS = -g -O0
+TEST_TARGET_FLAGS = -g -O0
.PRECIOUS: Output/%.first.ll Output/%.second.ll
$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
Modified: test-suite/trunk/TEST.llcdbg.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.llcdbg.Makefile?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/TEST.llcdbg.Makefile (original)
+++ test-suite/trunk/TEST.llcdbg.Makefile Wed Jun 2 12:49:43 2010
@@ -15,8 +15,8 @@
##===----------------------------------------------------------------------===##
TESTNAME = $*
-TARGET_FLAGS = -g -O0
-LLC_DEBUG_FLAGS = -O0 -regalloc=local
+TEST_TARGET_FLAGS = -g -O0
+LLC_DEBUG_FLAGS = -O0 -regalloc=local $(LLCFLAGS)
.PRECIOUS: Output/%.first.s Output/%.second.s Output/%.t2b.s Output/%.t1b.s
$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
Modified: test-suite/trunk/TEST.m2regllcdbg.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.m2regllcdbg.Makefile?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/TEST.m2regllcdbg.Makefile (original)
+++ test-suite/trunk/TEST.m2regllcdbg.Makefile Wed Jun 2 12:49:43 2010
@@ -15,8 +15,8 @@
##===----------------------------------------------------------------------===##
TESTNAME = $*
-TARGET_FLAGS = -g -O0
-LLC_DEBUG_FLAGS = -O0 -regalloc=local
+TEST_TARGET_FLAGS = -g -O0
+LLC_DEBUG_FLAGS = -O0 -regalloc=local $(LLCFLAGS)
.PRECIOUS: Output/%.first.s Output/%.second.s Output/%.t2c.s Output/%.t1c.s Output/%.t2b.bc Output/%.t1b.bc
$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
Modified: test-suite/trunk/TEST.optllcdbg.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.optllcdbg.Makefile?rev=105334&r1=105333&r2=105334&view=diff
==============================================================================
--- test-suite/trunk/TEST.optllcdbg.Makefile (original)
+++ test-suite/trunk/TEST.optllcdbg.Makefile Wed Jun 2 12:49:43 2010
@@ -15,8 +15,8 @@
##===----------------------------------------------------------------------===##
TESTNAME = $*
-TARGET_FLAGS = -g -O0
-LLC_DEBUG_FLAGS = -O3
+TEST_TARGET_FLAGS = -g -O0
+LLC_DEBUG_FLAGS = -O3 $(LLCFLAGS)
OPT_FLAGS = -std-compile-opts
.PRECIOUS: Output/%.first.s Output/%.second.s Output/%.t2c.s Output/%.t1c.s Output/%.t2b.bc Output/%.t1b.bc Output/%.t1a.bc Output/%.t2a.bc
More information about the llvm-commits
mailing list