forked from enlightenment/efl
efl: add compiler flags
* -fvisibility=hidden will hide symbols not marked with EAPI in the final binary (so/executable). * -ffunction-sections and -fdata-sections will split those into independent elf sections, then we can -Wl,--gc-sections for those that are unused. During development --Wl,--print-gc-sections will warn us of functions that are left unused and were collected. SVN revision: 81906
This commit is contained in:
parent
64fa645e80
commit
ec75e20486
|
@ -424,11 +424,12 @@ AC_CHECK_TYPES([siginfo_t], [], [],
|
||||||
|
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
EFL_CHECK_COMPILER_FLAGS([EFL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers])
|
EFL_CHECK_COMPILER_FLAGS([EFL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections])
|
||||||
EFL_CHECK_LINKER_FLAGS([EFL], [-fno-strict-aliasing -Wl,--as-needed])
|
EFL_CHECK_LINKER_FLAGS([EFL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed])
|
||||||
case "${build_profile}" in
|
case "${build_profile}" in
|
||||||
dev)
|
dev)
|
||||||
EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow])
|
EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow])
|
||||||
|
EFL_CHECK_LINKER_FLAGS([EFL], [-Wl,--print-gc-sections])
|
||||||
;;
|
;;
|
||||||
|
|
||||||
debug)
|
debug)
|
||||||
|
|
Loading…
Reference in New Issue