Bug 1484872 - Move LTO flags to python configure. r=froydnj

This commit is contained in:
Mike Hommey 2018-08-17 09:05:27 +09:00
Родитель 1b5bd092ec
Коммит d1714fc61d
5 изменённых файлов: 13 добавлений и 26 удалений

Просмотреть файл

@ -4,18 +4,6 @@ dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
AC_DEFUN([MOZ_CONFIG_SANITIZE], [
dnl ========================================================
dnl = Link Time Optimization (LTO)
dnl ========================================================
if test -n "$MOZ_LTO"; then
AC_DEFINE(MOZ_LTO)
CFLAGS="$CFLAGS $MOZ_LTO_CFLAGS"
CPPFLAGS="$CPPFLAGS $MOZ_LTO_CFLAGS"
CXXFLAGS="$CXXFLAGS $MOZ_LTO_CFLAGS"
LDFLAGS="$LDFLAGS $MOZ_LTO_LDFLAGS"
fi
AC_SUBST(MOZ_LTO)
dnl ========================================================
dnl = Use Address Sanitizer
dnl ========================================================

Просмотреть файл

@ -1402,9 +1402,10 @@ def lto(value, pgo, c_compiler):
)
add_old_configure_assignment('MOZ_LTO', lto.enabled)
add_old_configure_assignment('MOZ_LTO_CFLAGS', lto.cflags)
add_old_configure_assignment('MOZ_LTO_LDFLAGS', lto.ldflags)
set_config('MOZ_LTO', lto.enabled)
set_define('MOZ_LTO', lto.enabled)
set_config('MOZ_LTO_CFLAGS', lto.cflags)
set_config('MOZ_LTO_LDFLAGS', lto.ldflags)
# ASAN
# ==============================================================

Просмотреть файл

@ -38,7 +38,7 @@ for v in ('OS_CPPFLAGS', 'OS_CFLAGS', 'DEBUG', 'CLANG_PLUGIN', 'OPTIMIZE',
idx += 1
COMPILE_FLAGS[v] = flags
COMPILE_FLAGS['OS_CFLAGS'] += ['-O2', '-fno-stack-protector']
COMPILE_FLAGS['OS_CFLAGS'] += ['-O2', '-fno-stack-protector', '-fno-lto']
AllowCompilerWarnings()
NoVisibilityFlags()

Просмотреть файл

@ -14,11 +14,9 @@ if not CONFIG['CROSS_COMPILE']:
'test-ctors.c',
]
for f in CONFIG['OS_CFLAGS']:
if f.startswith('-flto'):
SOURCES['dummy.c'].flags += ['-fno-lto']
SOURCES['test-array.c'].flags += ['-fno-lto']
SOURCES['test-ctors.c'].flags += ['-fno-lto']
SOURCES['dummy.c'].flags += ['-fno-lto']
SOURCES['test-array.c'].flags += ['-fno-lto']
SOURCES['test-ctors.c'].flags += ['-fno-lto']
HOST_SOURCES += [
'elf.cpp',

Просмотреть файл

@ -199,12 +199,12 @@ INCLUDES = \
include $(MOZILLA_DIR)/config/static-checking-config.mk
LDFLAGS = $(COMPUTED_LDFLAGS) $(PGO_LDFLAGS) $(MK_LDFLAGS)
LDFLAGS = $(MOZ_LTO_LDFLAGS) $(COMPUTED_LDFLAGS) $(PGO_LDFLAGS) $(MK_LDFLAGS)
COMPILE_CFLAGS = $(COMPUTED_CFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
COMPILE_CXXFLAGS = $(COMPUTED_CXXFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS) $(MOZBUILD_CMFLAGS)
COMPILE_CMMFLAGS = $(OS_COMPILE_CMMFLAGS) $(MOZBUILD_CMMFLAGS)
COMPILE_CFLAGS = $(MOZ_LTO_CFLAGS) $(COMPUTED_CFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
COMPILE_CXXFLAGS = $(MOZ_LTO_CFLAGS) $(COMPUTED_CXXFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
COMPILE_CMFLAGS = $(MOZ_LTO_CFLAGS) $(OS_COMPILE_CMFLAGS) $(MOZBUILD_CMFLAGS)
COMPILE_CMMFLAGS = $(MOZ_LTO_CFLAGS) $(OS_COMPILE_CMMFLAGS) $(MOZBUILD_CMMFLAGS)
ASFLAGS = $(COMPUTED_ASFLAGS)
SFLAGS = $(COMPUTED_SFLAGS)