-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
# Configuration file for the 'lit' test runner.
import os
+import sys
# name: The name of this test suite.
config.name = 'LLVM'
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')
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.