File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ target_link_libraries(
3232# ENABLE_EXPORTS is required so that symbols from each shared library are
3333# visible to other shared libraries loaded at runtime (e.g. dl_test_overrider
3434# can resolve symbols from dl_test_method/dl_test_registry).
35+ # CXX_VISIBILITY_PRESET must be "default" so that the template static variables
36+ # used as the shared registry state (policy statics) are exported with DEFAULT
37+ # ELF visibility. With hidden visibility (as set by BoostRoot.cmake in the
38+ # super-project build) they become UNIQUE HIDDEN and are not deduplicated by
39+ # the dynamic linker, breaking cross-DSO state sharing.
3540foreach (
3641 target dl_test_registry dl_test_method dl_test_overrider
3742 boost_openmethod-test_dynamic_loading)
@@ -41,7 +46,9 @@ foreach(
4146 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} "
4247 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} "
4348 ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} "
44- ENABLE_EXPORTS ON )
49+ ENABLE_EXPORTS ON
50+ CXX_VISIBILITY_PRESET default
51+ VISIBILITY_INLINES_HIDDEN OFF )
4552endforeach ()
4653
4754add_test (
You can’t perform that action at this time.
0 commit comments