summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-06-22 23:23:19 +0000
committerAndrew Trick <atrick@apple.com>2011-06-22 23:23:19 +0000
commitf2a58425cd2a288b1d9fc3d2484ac774d361a0d7 (patch)
tree886dadc60c20d9c05fae3d279a63608e10ba32f1 /test/Makefile
parent1a3ab63cb59d7f7726b47cdda3b9509e999d1653 (diff)
downloadllvm-f2a58425cd2a288b1d9fc3d2484ac774d361a0d7.tar.gz
llvm-f2a58425cd2a288b1d9fc3d2484ac774d361a0d7.tar.bz2
llvm-f2a58425cd2a288b1d9fc3d2484ac774d361a0d7.tar.xz
lit support for REQUIRES: asserts.
Take #2. Don't piggyback on the existing config.build_mode. Instead, define a new lit feature for each build feature we need (currently just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define this feature within test/lit.site.cfg. This doesn't require any lit harness changes and should be more robust across build systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile
index e38226a468..4e34e7222e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -171,15 +171,21 @@ site.exp: FORCE
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
+ifeq ($(DISABLE_ASSERTIONS),1)
+ENABLE_ASSERTIONS=0
+else
+ENABLE_ASSERTIONS=1
+endif
+
lit.site.cfg: site.exp
@echo "Making LLVM 'lit.site.cfg' file..."
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
- @$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> lit.tmp
@$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> lit.tmp
@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
+ @$(ECHOPATH) s=@LLVM_ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp
@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
@-rm -f lit.tmp