File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -53,3 +53,7 @@ option(
5353 "Treat all compile warnings as errors at the build phase"
5454)
5555mark_as_advanced (CMAKE_COMPILE_WARNING_AS_ERROR)
56+
57+ # Set default visibility of all symbols to hidden if the compiler (for example,
58+ # GCC >= 4) supports it. This can help reduce the binary size and startup time.
59+ set (CMAKE_C_VISIBILITY_PRESET "hidden" )
Original file line number Diff line number Diff line change @@ -32,17 +32,6 @@ if(PHP_HAVE_BROKEN_OPTIMIZE_STRLEN)
3232 endif ()
3333endif ()
3434
35- # Mark symbols hidden by default if the compiler (for example, GCC >= 4)
36- # supports it. This can help reduce the binary size and startup time.
37- php_check_compiler_flag(C -fvisibility=hidden HAVE_FVISIBILITY_HIDDEN_C)
38- if (HAVE_FVISIBILITY_HIDDEN_C)
39- target_compile_options (
40- php_config
41- INTERFACE
42- $<$<COMPILE_LANGUAGE:ASM,C>:-fvisibility=hidden>
43- )
44- endif ()
45-
4635php_check_compiler_flag(C -Wno-sign-compare HAVE_WNO_SIGN_COMPARE_C)
4736if (CXX IN_LIST enabledLanguages)
4837 php_check_compiler_flag(CXX -Wno-sign-compare HAVE_WNO_SIGN_COMPARE_CXX)
You can’t perform that action at this time.
0 commit comments