Index: lit/CMakeLists.txt =================================================================== --- lit/CMakeLists.txt +++ lit/CMakeLists.txt @@ -46,6 +46,7 @@ # the value is not canonicalized within LLVM llvm_canonicalize_cmake_booleans( + LLDB_DISABLE_PYTHON LLVM_ENABLE_ZLIB) configure_lit_site_cfg( Index: lit/Suite/lit.site.cfg.in =================================================================== --- lit/Suite/lit.site.cfg.in +++ lit/Suite/lit.site.cfg.in @@ -13,6 +13,7 @@ config.python_executable = "@PYTHON_EXECUTABLE@" config.dotest_path = "@LLDB_SOURCE_DIR@/test/dotest.py" config.dotest_args_str = "@LLDB_DOTEST_ARGS@" +config.lldb_disable_python = @LLDB_DISABLE_PYTHON@ # Additional dotest arguments can be passed to lit by providing a Index: lit/Suite/lldbtest.py =================================================================== --- lit/Suite/lldbtest.py +++ lit/Suite/lldbtest.py @@ -37,6 +37,9 @@ if litConfig.noExecute: return lit.Test.PASS, '' + if test.config.lldb_disable_python: + return (lit.Test.UNSUPPORTED, 'Python module disabled') + if test.config.unsupported: return (lit.Test.UNSUPPORTED, 'Test is unsupported')