File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -476,7 +476,13 @@ include(GStreamerChecks)
476476
477477# Optimize binary size for release builds by removing dead sections on unix/gcc.
478478if (COMPILER_IS_GCC_OR_CLANG AND UNIX AND NOT APPLE )
479- if (CMAKE_COMPILER_IS_GNUCC)
479+ # Conditioned on ARM/ARM64 since those are the targets we know support section
480+ # anchoring, for builds on X86 and X86-64 target, this option is not supported.
481+ # It may be supported on several others aside from ARM*.
482+ # The GCC documentation is poor in that it says the option is target dependent,
483+ # but fails to decribe on which targets it is supported. I didn't fancy reading
484+ # the source to find out.
485+ if (CMAKE_COMPILER_IS_GNUCC AND (WTF_CPU_ARM64 OR WTF_CPU_ARM))
480486 set (CMAKE_COMPILER_SIZE_OPT_FLAGS " -finline-limit=90 -fsection-anchors" )
481487 endif ()
482488 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