File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -454,7 +454,13 @@ include(GStreamerChecks)
454454
455455# Optimize binary size for release builds by removing dead sections on unix/gcc.
456456if (COMPILER_IS_GCC_OR_CLANG AND UNIX AND NOT APPLE )
457- if (CMAKE_COMPILER_IS_GNUCC)
457+ # Conditioned on ARM/ARM64 since those are the targets we know support section
458+ # anchoring, for builds on X86 and X86-64 target, this option is not supported.
459+ # It may be supported on several others aside from ARM*.
460+ # The GCC documentation is poor in that it says the option is target dependent,
461+ # but fails to decribe on which targets it is supported. I didn't fancy reading
462+ # the source to find out.
463+ if (CMAKE_COMPILER_IS_GNUCC AND (WTF_CPU_ARM64 OR WTF_CPU_ARM))
458464 set (CMAKE_COMPILER_SIZE_OPT_FLAGS " -finline-limit=90 -fsection-anchors" )
459465 endif ()
460466 set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${CMAKE_COMPILER_SIZE_OPT_FLAGS} -ffunction-sections -fdata-sections" )
You can’t perform that action at this time.
0 commit comments