diff --git a/test/Makefile b/test/Makefile index 06b997df906..6312a3f6060 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 b529169df00..aa1e1a979ac 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 56b0a82f6f7..eb5fa8c243b 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.