diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index f627c72355428..f6acdf7bda9b2 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -626,6 +626,9 @@ def skipUnlessTargetAndroid(func): def swiftTest(func): """Decorate the item as a Swift test (Darwin/Linux only, no i386).""" def is_not_swift_compatible(self): + swift_enabled_error = _get_bool_config_skip_if_decorator("swift")(func) + if swift_enabled_error: + return swift_enabled_error if self.getDebugInfo() == "gmodules": return "skipping (gmodules only makes sense for clang tests)" diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index e8851333770c8..e1f64be177a4f 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -702,6 +702,12 @@ SBStructuredData SBDebugger::GetBuildConfiguration() { "A boolean value that indicates if lua support is enabled in LLDB"); AddLLVMTargets(*config_up); +#ifdef LLDB_ENABLE_SWIFT + AddBoolConfigEntry( + *config_up, "swift", true, + "A boolean value that indicates if Swift support is enabled in LLDB"); +#endif // LLDB_ENABLE_SWIFT + SBStructuredData data; data.m_impl_up->SetObjectSP(std::move(config_up)); return LLDB_RECORD_RESULT(data);