forked from mirrors/gecko-dev
Bug 1896066 - Move -ffunction-sections, -fdata-sections, -fno-exceptions and -fno-math-errno flag detection to moz.configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D210036
This commit is contained in:
parent
7cdf21c6de
commit
5047036a8a
2 changed files with 9 additions and 10 deletions
|
|
@ -7,16 +7,6 @@ dnl Add compiler specific options
|
|||
dnl A high level macro for selecting compiler options.
|
||||
AC_DEFUN([MOZ_COMPILER_OPTS],
|
||||
[
|
||||
if test "$GNU_CC"; then
|
||||
if test -z "$DEVELOPER_OPTIONS"; then
|
||||
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
|
||||
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -fno-math-errno"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno"
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Identical Code Folding
|
||||
dnl ========================================================
|
||||
|
|
|
|||
|
|
@ -11,6 +11,15 @@ check_and_add_flag("-fno-sized-deallocation", compiler=cxx_compiler)
|
|||
# from the clang and GCC documentation, but they both support this.
|
||||
check_and_add_flag("-fno-aligned-new", compiler=cxx_compiler)
|
||||
|
||||
|
||||
with only_when(building_with_gnu_cc):
|
||||
with only_when(~developer_options):
|
||||
add_flag("-ffunction-sections")
|
||||
add_flag("-fdata-sections")
|
||||
add_flag("-fno-math-errno")
|
||||
add_flag("-fno-exceptions", compiler=cxx_compiler)
|
||||
|
||||
|
||||
# Please keep these last in this file.
|
||||
add_old_configure_assignment("_COMPILATION_CFLAGS", compilation_flags.cflags)
|
||||
add_old_configure_assignment("_COMPILATION_CXXFLAGS", compilation_flags.cxxflags)
|
||||
|
|
|
|||
Loading…
Reference in a new issue