File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,10 @@ function(aws_set_common_properties target)
257257 # We do this so that backtraces are more likely to show function names.
258258 # We mostly use backtraces to diagnose memory leaks.
259259 if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
260- set_target_properties (${target} PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON )
260+ # And dont hide symbols on anything pre GCC 5.0 (Visibility support was not great on older compilers and some libraries didnt annotate visibility -
261+ # looking at you jni, which does not annotate on gcc less than 4.2. Mixing no annotation and hidden symbols leads to unexpected failures.).
262+ if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" ))
263+ set_target_properties (${target} PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON )
264+ endif ()
261265 endif ()
262266endfunction ()
You can’t perform that action at this time.
0 commit comments