test: Add the new feature 'loadable_module'.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 29 Nov 2010 00:20:09 +0000 (00:20 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 29 Nov 2010 00:20:09 +0000 (00:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120273 91177308-0d34-0410-b5e6-96231b3b80d8

test/Makefile
test/lit.cfg
test/lit.site.cfg.in

index 06b997df906804f0ddbce2daef26b3a72c3a24bb..6312a3f606070b8b36817f84ed500846409dae65 100644 (file)
@@ -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
index b529169df001a42e5d7216829040580ce53fb326..aa1e1a979ace2958a3e84e32a7e7333e4c2d2f2a 100644 (file)
@@ -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')
index 56b0a82f6f798b357f4b8b2d714501ec6e6790cc..eb5fa8c243b21afdd68e2a8347d3565bc8c49e46 100644 (file)
@@ -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.