Bug 945042 - Move NO_PROFILE_GUIDED_OPTIMIZE to moz.build. r=gps,r=njn

This commit is contained in:
Mike Hommey 2013-12-09 13:39:26 +09:00
parent b453ccf66e
commit 3325256d97
39 changed files with 71 additions and 100 deletions

View File

@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NO_PROFILE_GUIDED_OPTIMIZE = 1
include $(topsrcdir)/config/config.mk
DIST_PROGRAM = CommandExecuteHandler$(BIN_SUFFIX)

View File

@ -16,3 +16,5 @@ DIST_SUBDIR = ''
for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM'):
DEFINES[var] = True
NO_PGO = True

View File

@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NO_PROFILE_GUIDED_OPTIMIZE = 1
include $(topsrcdir)/config/config.mk
OS_LIBS = \

View File

@ -14,3 +14,5 @@ DIST_SUBDIR = 'metro/install'
for var in ('UNICODE', '_UNICODE'):
DEFINES[var] = True
NO_PGO = True

View File

@ -9,8 +9,6 @@ USE_STATIC_LIBS = 1
MOZ_GLUE_LDFLAGS =
MOZ_GLUE_PROGRAM_LDFLAGS =
NO_PROFILE_GUIDED_OPTIMIZE = 1
include $(topsrcdir)/config/config.mk
OS_LIBS = \

View File

@ -15,3 +15,5 @@ DIST_SUBDIR = ''
for var in ('UNICODE', '_UNICODE'):
DEFINES[var] = True
NO_PGO = True

View File

@ -5,8 +5,6 @@
INTERNAL_TOOLS = 1
NO_PROFILE_GUIDED_OPTIMIZE = 1
VPATH += $(topsrcdir)/build
OS_CXXFLAGS := $(filter-out -fno-exceptions,$(OS_CXXFLAGS)) -fexceptions

View File

@ -4,7 +4,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
INTERNAL_TOOLS = 1
NO_PROFILE_GUIDED_OPTIMIZE = 1
include $(topsrcdir)/config/rules.mk

View File

@ -18,3 +18,5 @@ GENERATED_SOURCES += [
]
DEFINES['ELFHACK_BUILD'] = True
NO_PGO = True

View File

@ -25,3 +25,5 @@ HOST_SOURCES += [
HOST_PROGRAM = 'elfhack'
DEFINES['ELFHACK_BUILD'] = True
NO_PGO = True

View File

@ -4,7 +4,6 @@
STL_FLAGS =
NO_EXPAND_LIBS = 1
NO_PROFILE_GUIDED_OPTIMIZE = 1
include $(topsrcdir)/config/rules.mk

View File

@ -15,3 +15,5 @@ if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
]
FORCE_STATIC_LIB = True
NO_PGO = True

View File

@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NO_PROFILE_GUIDED_OPTIMIZE = 1
ifdef ENABLE_TESTS
USE_STATIC_LIBS = 1

View File

@ -14,3 +14,5 @@ if CONFIG['ENABLE_TESTS']:
SOURCES += [
'crashinject.cpp',
]
NO_PGO = True

View File

@ -642,7 +642,7 @@ tools::
endif
##############################################
ifndef NO_PROFILE_GUIDED_OPTIMIZE
ifneq (1,$(NO_PROFILE_GUIDED_OPTIMIZE))
ifdef MOZ_PROFILE_USE
ifeq ($(OS_ARCH)_$(GNU_CC), WINNT_)
# When building with PGO, we have to make sure to re-link

View File

@ -46,11 +46,6 @@ ifeq ($(OS_ARCH),WINNT)
MODULE_OPTIMIZE_FLAGS = -O2
endif
# disable PGO for Sun Studio
ifdef SOLARIS_SUNPRO_CC
NO_PROFILE_GUIDED_OPTIMIZE = 1
endif
include $(topsrcdir)/config/rules.mk
# next line allows use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS, maybe others

View File

@ -62,3 +62,7 @@ if CONFIG['OS_TARGET'] == 'Android':
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
DEFINES['HAVE_MALLOC_USABLE_SIZE'] = True
DEFINES['SQLITE_WITHOUT_MSIZE'] = True
# disable PGO for Sun Studio
if CONFIG['SOLARIS_SUNPRO_CC']:
NO_PGO = True

View File

@ -25,13 +25,3 @@ CXXFLAGS += \
$(NULL)
CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
ifdef _MSC_VER
ifeq ($(CPU_ARCH),x86_64)
# Workaround compiler bug (Bug 795594)
NO_PROFILE_GUIDED_OPTIMIZE := \
LayerTreeInvalidation.cpp \
Layers.cpp \
$(NULL)
endif
endif

View File

@ -254,11 +254,9 @@ UNIFIED_SOURCES += [
'ipc/SharedPlanarYCbCrImage.cpp',
'ipc/SharedRGBImage.cpp',
'ipc/TaskThrottler.cpp',
'Layers.cpp',
'LayerScope.cpp',
'LayersLogging.cpp',
'LayerSorter.cpp',
'LayerTreeInvalidation.cpp',
'opengl/CompositingRenderTargetOGL.cpp',
'opengl/CompositorOGL.cpp',
'opengl/OGLShaderProgram.cpp',
@ -274,8 +272,18 @@ UNIFIED_SOURCES += [
SOURCES += [
'basic/BasicImageLayer.cpp',
'ImageContainer.cpp',
'Layers.cpp',
'LayerTreeInvalidation.cpp',
]
# Workaround compiler bug (Bug 795594)
if CONFIG['_MSC_VER'] and CONFIG['CPU_ARCH'] == 'x86_64':
for src in [
'Layers.cpp',
'LayerTreeInvalidation.cpp',
]:
SOURCES[src].no_pgo = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
SOURCES += [
'basic/MacIOSurfaceTextureHostBasic.cpp',

View File

@ -380,22 +380,6 @@ endif
ifdef _MSC_VER
# XXX We should add this to CXXFLAGS, too?
CFLAGS += -fp:precise
ifeq ($(CPU_ARCH),x86)
# Workaround compiler bug on PGO (Bug 721284)
NO_PROFILE_GUIDED_OPTIMIZE := \
MonoIC.cpp \
Compiler.cpp \
$(NULL)
# Ditto (Bug 772303)
NO_PROFILE_GUIDED_OPTIMIZE += RegExp.cpp
endif
# Ditto (Bug 810661)
ifeq ($(CPU_ARCH),x86_64)
NO_PROFILE_GUIDED_OPTIMIZE := \
CTypes.cpp \
$(NULL)
endif
endif # _MSC_VER
ifeq ($(OS_ARCH),FreeBSD)

View File

@ -642,7 +642,7 @@ tools::
endif
##############################################
ifndef NO_PROFILE_GUIDED_OPTIMIZE
ifneq (1,$(NO_PROFILE_GUIDED_OPTIMIZE))
ifdef MOZ_PROFILE_USE
ifeq ($(OS_ARCH)_$(GNU_CC), WINNT_)
# When building with PGO, we have to make sure to re-link

View File

@ -13,6 +13,10 @@
#include "jit/IonAnalysis.h"
#include "jit/MIR.h"
// windows.h defines those, which messes with the definitions below.
#undef min
#undef max
namespace js {
namespace jit {

View File

@ -98,7 +98,6 @@ UNIFIED_SOURCES += [
'builtin/Object.cpp',
'builtin/ParallelArray.cpp',
'builtin/Profilers.cpp',
'builtin/RegExp.cpp',
'builtin/TestingFunctions.cpp',
'builtin/TypedObject.cpp',
'builtin/TypeRepresentation.cpp',
@ -197,6 +196,8 @@ UNIFIED_SOURCES += [
# jsarray.cpp and jsatom.cpp cannot be built in unified mode because
# xpcshell is broken during packaging when compiled with gcc-4.8.2
# builtin/RegExp.cpp cannot be built in unified mode because it is built
# without PGO
# frontend/Parser.cpp cannot be built in unified mode because of explicit
# template instantiations.
# jsmath.cpp cannot be built in unified mode because it needs to pull rand_s
@ -204,6 +205,7 @@ UNIFIED_SOURCES += [
# jsutil.cpp cannot be built in unified mode because it is needed for
# check-vanilla-allocations.
SOURCES += [
'builtin/RegExp.cpp',
'frontend/Parser.cpp',
'jsarray.cpp',
'jsatom.cpp',
@ -423,3 +425,9 @@ if CONFIG['JS_HAS_CTYPES']:
if CONFIG['MOZ_LINKER']:
DEFINES['MOZ_LINKER'] = True
if CONFIG['_MSC_VER']:
if CONFIG['CPU_ARCH'] == 'x86':
SOURCES['builtin/RegExp.cpp'].no_pgo = True # Bug 772303
elif CONFIG['CPU_ARCH'] == 'x86_64':
SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661

View File

@ -4,13 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ifdef _MSC_VER
# unnecessary PGO for js shell. But gcc cannot turn off pgo because it is
# necessary to link PGO lib on gcc when a object/static lib are compiled
# for PGO.
NO_PROFILE_GUIDED_OPTIMIZE := 1
endif
LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(MOZ_ZLIB_LIBS)
ifdef MOZ_NATIVE_FFI
EXTRA_LIBS += $(MOZ_FFI_LIBS)

View File

@ -16,3 +16,9 @@ UNIFIED_SOURCES += [
# on its behalf.
for var in ('EXPORT_JS_API', 'IMPL_MFBT'):
DEFINES[var] = True
if CONFIG['_MSC_VER']:
# unnecessary PGO for js shell. But gcc cannot turn off pgo because it is
# necessary to link PGO lib on gcc when a object/static lib are compiled
# for PGO.
NO_PGO = True

View File

@ -108,11 +108,6 @@ quantize_ssse3.$(OBJ_SUFFIX): vp8_asm_enc_offsets.asm
ifdef VPX_NEED_OBJ_INT_EXTRACT
# only for MSVC
ifdef _MSC_VER
NO_PROFILE_GUIDED_OPTIMIZE := vpx_scale_asm_offsets.c vp8_asm_enc_offsets.c
endif
vpx_scale_asm_offsets.asm: vpx_scale_asm_offsets.$(OBJ_SUFFIX) $(HOST_PROGRAM)
./$(HOST_PROGRAM) $(VPX_OIE_FORMAT) $< \
$(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@

View File

@ -25,10 +25,14 @@ if CONFIG['MOZ_VPX_ERROR_CONCEALMENT']:
SOURCES += files['ERROR_CONCEALMENT']
if CONFIG['VPX_X86_ASM'] and CONFIG['OS_TARGET'] == 'WINNT':
SOURCES += [
offset_sources = [
'vp8/encoder/vp8_asm_enc_offsets.c',
'vpx_scale/vpx_scale_asm_offsets.c',
]
SOURCES += offset_sources
if CONFIG['_MSC_VER']:
for s in offset_sources:
SOURCES[s].no_pgo = True
if CONFIG['VPX_X86_ASM']:
SOURCES += files['X86_ASM']

View File

@ -9,12 +9,6 @@ ifndef GNU_CC
MODULE_OPTIMIZE_FLAGS = -xO5
endif
endif
ifeq (Linux,$(OS_TARGET))
#XXX: PGO on Linux causes problems here
# See bug 419470
NO_PROFILE_GUIDED_OPTIMIZE = 1
endif
endif
LOCAL_INCLUDES += -I$(topsrcdir)/memory/build

View File

@ -26,3 +26,8 @@ if CONFIG['MOZ_REPLACE_MALLOC']:
DEFINES['MOZ_REPLACE_MALLOC'] = True
DEFINES['MOZ_JEMALLOC_IMPL'] = True
#XXX: PGO on Linux causes problems here
# See bug 419470
if CONFIG['OS_TARGET'] == 'Linux':
NO_PGO = True

View File

@ -1,6 +0,0 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NO_PROFILE_GUIDED_OPTIMIZE = 1 # Don't PGO

View File

@ -39,3 +39,5 @@ if CONFIG['OS_TARGET'] == 'WINNT':
DEFINES['__Userspace_os_Windows'] = 1
else:
DEFINES['__Userspace_os_%s' % CONFIG['OS_TARGET']] = 1
NO_PGO = True # Don't PGO

View File

@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NO_PROFILE_GUIDED_OPTIMIZE = 1 # Don't PGO
ifeq ($(OS_TARGET),Darwin)
DEFINES += \
-U__APPLE__ \

View File

@ -80,3 +80,5 @@ if CONFIG['OS_TARGET'] == 'Darwin':
if CONFIG['OS_TARGET'] in ('Linux', 'Android'):
# to make sure that in6_pktinfo gets defined on all distros
DEFINES['_GNU_SOURCE'] = True
NO_PGO = True # Don't PGO

View File

@ -5,8 +5,6 @@
MOZILLA_INTERNAL_API =1
NO_PROFILE_GUIDED_OPTIMIZE = nsDebugImpl.cpp
INSTALL_TARGETS += errorlist
errorlist_FILES := \
ErrorListCDefines.h \

View File

@ -91,6 +91,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += [
'nsDebugImpl.cpp',
]
SOURCES['nsDebugImpl.cpp'].no_pgo = True
UNIFIED_SOURCES += [
'AvailableMemoryTracker.cpp',
@ -129,8 +130,6 @@ UNIFIED_SOURCES += [
'nsErrorAssertsC.c',
]
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')

View File

@ -3,21 +3,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NO_PROFILE_GUIDED_OPTIMIZE = 1
MOZILLA_INTERNAL_API = 1
#
# The default is this buildable, but non-functioning code.
#
ifeq ($(OS_ARCH),SunOS)
ifneq (86,$(findstring 86,$(OS_TEST)))
# disable PGO for this directory with Sun Studio on SPARC because
# compiling with xprofile=collect will insert code into nsXPTCStubBase::Stub##n
NO_PROFILE_GUIDED_OPTIMIZE = 1
endif
endif
######################################################################
# ARM
######################################################################

View File

@ -308,3 +308,5 @@ if CONFIG['OS_ARCH'] == 'Linux':
]
FINAL_LIBRARY = 'xpcom_core'
NO_PGO = True

View File

@ -7,14 +7,6 @@ MOZILLA_INTERNAL_API = 1
LOCAL_INCLUDES += -I$(srcdir)/../../../../xptinfo/src
ifneq ($(TARGET_CPU),x86_64)
ifndef GNU_CXX
# FIXME: bug 413019
NO_PROFILE_GUIDED_OPTIMIZE = 1
endif #!GNU_CXX
endif #!x86_64
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += -I$(srcdir)/../..

View File

@ -35,3 +35,8 @@ else:
]
FINAL_LIBRARY = 'xpcom_core'
if CONFIG['TARGET_CPU'] != 'x86_64':
if not CONFIG['GNU_CXX']:
# FIXME: bug 413019
NO_PGO = True