Skip to content

[windows] fix flaky linker error when building LLDB #10613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: stable/20240723
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lldb/source/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions lldb/source/Plugins/Language/Swift/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down