diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt index 794c032012154..05f8860a65b08 100644 --- a/lldb/source/API/CMakeLists.txt +++ b/lldb/source/API/CMakeLists.txt @@ -152,9 +152,6 @@ add_lldb_library(liblldb SHARED ${option_framework} lldbValueObject lldbVersion ${LLDB_ALL_PLUGINS} -## BEGIN SWIFT - ${SWIFT_ALL_LIBS} -## END SWIFT LINK_COMPONENTS Support diff --git a/lldb/source/Plugins/Language/Swift/CMakeLists.txt b/lldb/source/Plugins/Language/Swift/CMakeLists.txt index 78cc8db0e8811..e80a158891db9 100644 --- a/lldb/source/Plugins/Language/Swift/CMakeLists.txt +++ b/lldb/source/Plugins/Language/Swift/CMakeLists.txt @@ -1,5 +1,11 @@ set(LLVM_NO_RTTI 1) +set(SWIFT_CORE_LIB) + +if(WIN32) + list(APPEND SWIFT_CORE_LIB swiftCore) +endif() + add_lldb_library(lldbPluginSwiftLanguage PLUGIN FoundationValueTypes.cpp LogChannelSwift.cpp @@ -27,6 +33,9 @@ add_lldb_library(lldbPluginSwiftLanguage PLUGIN lldbPluginTypeSystemSwift swiftAST swiftClangImporter + ${SWIFT_CORE_LIB} # Fix for a build error when linking lib/liblldb.lib on Windows: 'unresolved external symbol __imp_swift_addNewDSOImage referenced in function "void __cdecl swift_image_constructor(void)"' + # The symbol is present in the file but cannot be resolved. + # This is a temporary workaround. clangAST LINK_COMPONENTS