Author: tfiala Date: Fri Oct 28 19:29:15 2016 New Revision: 285484 URL: http://llvm.org/viewvc/llvm-project?rev=285484&view=rev Log: Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbols
LLDB_EXPORT_ALL_SYMBOLS used to instruct the build to export all the symbols in liblldb on CMake builds. This change limits the CMake define to only add in the lldb_private namespace to the symbols that normally get exported, such that we export all the symbols in the public lldb namespace and the lldb_private namespace. This is a fix for: https://llvm.org/bugs/show_bug.cgi?id=30822 Reviewers: labath, beanz Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26093 Added: lldb/trunk/source/API/liblldb-private.exports Modified: lldb/trunk/source/API/CMakeLists.txt Modified: lldb/trunk/source/API/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=285484&r1=285483&r2=285484&view=diff ============================================================================== --- lldb/trunk/source/API/CMakeLists.txt (original) +++ lldb/trunk/source/API/CMakeLists.txt Fri Oct 28 19:29:15 2016 @@ -103,16 +103,13 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo # If we're not exporting all symbols, we'll want to explicitly set # the exported symbols here. This prevents 'log enable --stack ...' # from working on some systems but limits the liblldb size. - MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols") + MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb namespace") add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports) else() # Don't use an explicit export. Instead, tell the linker to # export all symbols. - MESSAGE("-- Symbols (liblldb): exporting all symbols") - # Darwin linker doesn't need this extra step. - if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") - lldb_append_link_flags(liblldb "-Wl,--export-dynamic") - endif() + MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces") + add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports) endif() endif() Added: lldb/trunk/source/API/liblldb-private.exports URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/liblldb-private.exports?rev=285484&view=auto ============================================================================== --- lldb/trunk/source/API/liblldb-private.exports (added) +++ lldb/trunk/source/API/liblldb-private.exports Fri Oct 28 19:29:15 2016 @@ -0,0 +1,6 @@ +_ZN4lldb* +_ZNK4lldb* +_ZN12lldb_private* +_ZNK12lldb_private* +init_lld* +PyInit__lldb* _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits