aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-11-29 00:20:09 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-11-29 00:20:09 +0000
commitb3ccc12831cedb8785611192f47377a947df8dce (patch)
tree117dfd75a48f9f639398a92c50c2f46121ed6e3b /test
parent849f2e381e4e83dc4f60e4a1fe6e6bb47bde8248 (diff)
downloadexternal_llvm-b3ccc12831cedb8785611192f47377a947df8dce.zip
external_llvm-b3ccc12831cedb8785611192f47377a947df8dce.tar.gz
external_llvm-b3ccc12831cedb8785611192f47377a947df8dce.tar.bz2
test: Add the new feature 'loadable_module'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Makefile1
-rw-r--r--test/lit.cfg13
-rw-r--r--test/lit.site.cfg.in1
3 files changed, 15 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index 06b997d..6312a3f 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -176,6 +176,7 @@ lit.site.cfg: site.exp
-e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
-e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
-e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
+ -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
$(PROJ_SRC_DIR)/lit.site.cfg.in > $@
Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE
diff --git a/test/lit.cfg b/test/lit.cfg
index b529169..aa1e1a9 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -3,6 +3,7 @@
# Configuration file for the 'lit' test runner.
import os
+import sys
# name: The name of this test suite.
config.name = 'LLVM'
@@ -214,3 +215,15 @@ def on_clone(parent, cfg, for_path):
lit.error('unable to understand %r:\n%s' % (libPath, lib))
config.on_clone = on_clone
+
+### Features
+
+# Loadable module
+# FIXME: This should be supplied by Makefile or autoconf.
+if sys.platform in ['win32', 'cygwin']:
+ loadable_module = (config.enable_shared == 1)
+else:
+ loadable_module = True
+
+if loadable_module:
+ config.available_features.add('loadable_module')
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 56b0a82..eb5fa8c 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -5,6 +5,7 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvmgcc_dir = "@LLVMGCCDIR@"
config.python_executable = "@PYTHON_EXECUTABLE@"
+config.enable_shared = @ENABLE_SHARED@
# Support substitution of the tools_dir with user parameters. This is
# used when we can't determine the tool dir at configuration time.