Skip to content

[lldb][windows] Allow exporting plugin symbols in LLDB_EXPORT_ALL_SYMBOLS #71087

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

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lldb/cmake/modules/LLDBConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ set(LLDB_EXPORT_ALL_SYMBOLS 0 CACHE BOOL
set(LLDB_EXPORT_ALL_SYMBOLS_EXPORTS_FILE "" CACHE PATH
"When `LLDB_EXPORT_ALL_SYMBOLS` is enabled, this specifies the exports file to use when building liblldb.")

if (CMAKE_SYSTEM_NAME MATCHES "Windows")
set(LLDB_EXPORT_ALL_SYMBOLS_PLUGINS "" CACHE STRING
"When `LLDB_EXPORT_ALL_SYMBOLS` is enabled, this specifies the plugins whose symbols should be exported.")
endif()

if ((NOT MSVC) OR MSVC12)
add_definitions( -DHAVE_ROUND )
endif()
Expand Down
8 changes: 5 additions & 3 deletions lldb/source/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,15 @@ elseif (LLDB_EXPORT_ALL_SYMBOLS)
MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")

# Pull out the various lldb libraries linked into liblldb, these will be used
# when looking for symbols to extract. We ignore plugin libraries here,
# because these symbols aren't publicly exposed.
# when looking for symbols to extract. We ignore most plugin libraries here,
# because we may expose more symbols than the DLL limit and these symbols
# aren't useful to expose.
get_target_property(all_liblldb_libs liblldb LINK_LIBRARIES)
set(lldb_libs "")
foreach(lib ${all_liblldb_libs})
if(TARGET ${lib} AND ${lib} MATCHES "^lldb" AND
NOT ${lib} MATCHES "^lldbPlugin")
(${lib} IN_LIST LLDB_EXPORT_ALL_SYMBOLS_PLUGINS OR
NOT ${lib} MATCHES "^lldbPlugin"))
get_target_property(lib_type ${lib} TYPE)
if("${lib_type}" STREQUAL "STATIC_LIBRARY")
list(APPEND lldb_libs ${lib})
Expand Down