radford created this revision. radford added a reviewer: arphaman. Herald added a subscriber: mgorny. radford requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
Compiling lldb, in a cmake sub-project that compiles with visibility hidden, will generate a "cannot export hidden symbol" error because we require default visibility. Even though we export using -Wl,-exported_symbols_list,liblldb.exports, if each .cpp file is compiled with -fvisibility=hidden, then you'll get this warning and linking will fail. Essentially -exported_symbols_list is not strong enough to reverse the -fvisibility=hidden. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D100898 Files: lldb/cmake/modules/AddLLDB.cmake Index: lldb/cmake/modules/AddLLDB.cmake =================================================================== --- lldb/cmake/modules/AddLLDB.cmake +++ lldb/cmake/modules/AddLLDB.cmake @@ -97,6 +97,7 @@ else() target_link_libraries(${name} PRIVATE ${PARAM_CLANG_LIBS}) endif() + set_target_properties(${name} PROPERTIES CXX_VISIBILITY_PRESET default) endif() # A target cannot be changed to a FRAMEWORK after calling install() because
Index: lldb/cmake/modules/AddLLDB.cmake =================================================================== --- lldb/cmake/modules/AddLLDB.cmake +++ lldb/cmake/modules/AddLLDB.cmake @@ -97,6 +97,7 @@ else() target_link_libraries(${name} PRIVATE ${PARAM_CLANG_LIBS}) endif() + set_target_properties(${name} PROPERTIES CXX_VISIBILITY_PRESET default) endif() # A target cannot be changed to a FRAMEWORK after calling install() because
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits