Skip to content
Open
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
8 changes: 8 additions & 0 deletions ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@ endif()
if(APPLE)
target_link_libraries(couchbase PRIVATE -Wl,-undefined,dynamic_lookup)
endif()

if(UNIX AND NOT APPLE)
# Keep symbols from statically linked archives (libstdc++/libgcc when
# COUCHBASE_CXX_CLIENT_STATIC_STDLIB is on, BoringSSL, etc.) private to this
# extension. Ruby loads extensions with RTLD_GLOBAL, so exporting them lets a
# second copy of libstdc++ interpose on other C++ extensions in the process.
target_link_options(couchbase PRIVATE "LINKER:--exclude-libs,ALL")
endif()