Bug 968623 - Port the DEFINES variable in toolkit/library/Makefile.in to moz.build; r=glandium

This commit is contained in:
Ehsan Akhgari 2014-02-05 23:14:32 -05:00
parent d77c548458
commit 91fac0cd26
2 changed files with 29 additions and 50 deletions

View File

@ -66,50 +66,6 @@ EXTRA_DEPS += symverscript
endif
endif
# component libraries
ifdef MOZ_JSDEBUGGER
DEFINES += -DMOZ_JSDEBUGGER
endif
ifdef MOZ_PREF_EXTENSIONS
DEFINES += -DMOZ_PREF_EXTENSIONS
endif
ifdef MOZ_AUTH_EXTENSION
DEFINES += -DMOZ_AUTH_EXTENSION
endif
ifdef MOZ_PERMISSIONS
DEFINES += -DMOZ_PERMISSIONS
endif
ifdef MOZ_UNIVERSALCHARDET
DEFINES += -DMOZ_UNIVERSALCHARDET
endif
ifeq (,$(filter android gonk qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
ifdef MOZ_XUL
DEFINES += -DMOZ_FILEVIEW
endif
endif
# Platform-specific icon channel stuff - supported mostly-everywhere
ifneq (,$(filter windows os2 mac cocoa gtk2 gtk3 qt android,$(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DICON_DECODER
endif
ifdef MOZ_SPELLCHECK
DEFINES += -DMOZ_SPELLCHECK
endif
ifdef MOZ_ZIPWRITER
DEFINES += -DMOZ_ZIPWRITER
endif
ifdef MOZ_GIO_COMPONENT
DEFINES += -DMOZ_GIO_COMPONENT
endif
ifdef MOZ_APP_COMPONENT_LIBS
COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
endif
@ -393,12 +349,6 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
endif
ifdef MOZ_DEBUG
ifdef ENABLE_TESTS
DEFINES += -DENABLE_LAYOUTDEBUG
endif
endif
ifeq (WINNT_1,$(OS_TARGET)_$(MOZ_PROFILE_USE))
# Wrap linker to measure peak virtual memory usage.
LD := $(PYTHON) $(topsrcdir)/build/link.py $(CURDIR)/linker-vsize $(LD)

View File

@ -15,6 +15,35 @@ if CONFIG['OS_ARCH'] == 'WINNT':
'nsDllMain.cpp',
]
# component libraries
additional_defines = (
'MOZ_AUTH_EXTENSION',
'MOZ_GIO_COMPONENT',
'MOZ_JSDEBUGGER',
'MOZ_PERMISSIONS',
'MOZ_PREF_EXTENSIONS',
'MOZ_SPELLCHECK',
'MOZ_UNIVERSALCHARDET',
'MOZ_ZIPWRITER',
)
for var in additional_defines:
if CONFIG[var]:
DEFINES[var] = True
if CONFIG['MOZ_DEBUG'] and CONFIG['ENABLE_TESTS']:
DEFINES['ENABLE_LAYOUTDEBUG'] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('android', 'gonk', 'qt', 'os2',
'cocoa', 'windows') and \
CONFIG['MOZ_XUL']:
DEFINES['MOZ_FILEVIEW'] = True
# Platform-specific icon channel stuff - supported mostly-everywhere
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'os2', 'mac', 'cocoa',
'gtk2', 'gtk3', 'qt', 'android'):
DEFINES['ICON_DECODER'] = True
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True