[Lldb-commits] [PATCH] D147453: [LLDB] Ensure LLDB symbols are exported in LLDB_EXPORT_ALL_SYMBOLS is provided.
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 3 10:02:13 PDT 2023
wallace created this revision.
wallace added a reviewer: rriddle.
Herald added a project: All.
wallace requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
If we want to export all lldb symbols (i.e
LLDB_EXPORT_ALL_SYMBOLS=ON), we need to use default visibility for all
LLDB symbols even if a global `CMAKE_CXX_VISIBILITY_PRESET=hidden` is present.A
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147453
Files:
lldb/cmake/modules/AddLLDB.cmake
Index: lldb/cmake/modules/AddLLDB.cmake
===================================================================
--- lldb/cmake/modules/AddLLDB.cmake
+++ lldb/cmake/modules/AddLLDB.cmake
@@ -165,6 +165,16 @@
else()
set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
endif()
+
+
+ # If we want to export all lldb symbols (i.e LLDB_EXPORT_ALL_SYMBOLS=ON), we
+ # need to use default visibility# for all LLDB symbols even if a global
+ # `CMAKE_CXX_VISIBILITY_PRESET=hidden` is present.
+ if (LLDB_EXPORT_ALL_SYMBOLS)
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
+ target_compile_options(${name} PRIVATE "-fvisibility=default")
+ endif()
+ endif()
endfunction(add_lldb_library)
function(add_lldb_executable name)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147453.510543.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230403/d155520c/attachment.bin>
More information about the lldb-commits
mailing list