--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -510,17 +510,17 @@ def target_variables(target):
os_test = target.raw_cpu
add_old_configure_assignment('OS_TEST', os_test)
set_config('OS_TEST', os_test)
add_old_configure_assignment('CPU_ARCH', target.cpu)
set_config('CPU_ARCH', target.cpu)
if target.cpu in ('x86', 'x86_64'):
- set_config('INTEL_ARCHITECTURE', '1')
+ set_config('INTEL_ARCHITECTURE', True)
set_config('TARGET_CPU', target.raw_cpu)
set_config('TARGET_OS', target.raw_os)
@depends(host)
def host_variables(host):
if host.kernel == 'kFreeBSD':
os_arch = 'GNU_kFreeBSD'
@@ -615,22 +615,22 @@ def milestone(build_env):
with open(milestone_path, 'r') as fh:
milestone = fh.read().splitlines()[-1]
set_config('GRE_MILESTONE', milestone)
is_nightly = is_release = False
if 'a1' in milestone:
- set_config('NIGHTLY_BUILD', '1')
+ set_config('NIGHTLY_BUILD', True)
set_define('NIGHTLY_BUILD', '1')
add_old_configure_assignment('NIGHTLY_BUILD', '1')
is_nightly = True
elif 'a' not in milestone:
- set_config('RELEASE_BUILD', '1')
+ set_config('RELEASE_BUILD', True)
set_define('RELEASE_BUILD', '1')
add_old_configure_assignment('RELEASE_BUILD', '1')
is_release = True
return namespace(version=milestone,
is_nightly=is_nightly,
is_release=is_release)
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -16,43 +16,43 @@ def building_js(build_project, help):
# top-level configure, it can go away, although the JS_STANDALONE config
# will still need to be set depending on building_js above.
option(env='JS_STANDALONE', default=building_js,
help='Reserved for internal use')
@depends('JS_STANDALONE')
def js_standalone(value):
if value:
- set_config('JS_STANDALONE', '1')
+ set_config('JS_STANDALONE', True)
add_old_configure_assignment('JS_STANDALONE', '1')
js_option('--disable-js-shell', default=building_js,
help='Do not build the JS shell')
@depends('--disable-js-shell')
def js_shell(value):
if not value:
- set_config('JS_DISABLE_SHELL', '1')
+ set_config('JS_DISABLE_SHELL', True)
# SpiderMonkey as a shared library, and how its symbols are exported
# ==================================================================
js_option('--disable-shared-js', default=building_js,
help='Do not create a shared library')
js_option('--disable-export-js', default=building_js,
help='Do not mark JS symbols as DLL exported/visible')
@depends('--disable-shared-js', '--disable-export-js')
def static_js(shared_js, export_js):
if shared_js:
if not export_js:
error('Must export JS symbols when building a shared library.')
- set_config('JS_SHARED_LIBRARY', '1')
+ set_config('JS_SHARED_LIBRARY', True)
add_old_configure_assignment('JS_SHARED_LIBRARY', '1')
else:
if export_js:
set_define('STATIC_EXPORTABLE_JS_API', '1')
else:
set_define('STATIC_JS_API', '1')
set_define('MOZ_STATIC_JS', '1')
@@ -86,17 +86,17 @@ js_option('--enable-instruments', env='M
help='Enable instruments remote profiling')
@depends('--enable-instruments', target)
def instruments(value, target):
if value and target.os != 'OSX':
error('--enable-instruments cannot be used when targeting %s'
% target.os)
if value:
- set_config('MOZ_INSTRUMENTS', '1')
+ set_config('MOZ_INSTRUMENTS', True)
set_define('MOZ_INSTRUMENTS', '1')
add_old_configure_assignment('MOZ_INSTRUMENTS', '1')
imply_option('--enable-profiling', reason='--enable-instruments')
js_option('--enable-callgrind', env='MOZ_CALLGRIND',
help='Enable callgrind profiling')
@@ -109,24 +109,24 @@ def callgrind(value):
js_option('--enable-profiling', env='MOZ_PROFILING',
help='Set compile flags necessary for using sampling profilers '
'(e.g. shark, perf)')
@depends('--enable-profiling', target)
def profiling(value, target):
if value:
- set_config('MOZ_PROFILING', '1')
+ set_config('MOZ_PROFILING', True)
set_define('MOZ_PROFILING', '1')
add_old_configure_assignment('MOZ_PROFILING', '1')
if target.kernel == 'WINNT' or (target.kernel == 'Linux' and
target.os == 'GNU'):
imply_option('--enable-vtune', reason='--enable-profiling')
js_option('--enable-vtune', env='MOZ_VTUNE', help='Enable vtune profiling')
@depends('--enable-vtune')
def vtune(value):
if value:
- set_config('MOZ_VTUNE', '1')
+ set_config('MOZ_VTUNE', True)
set_define('MOZ_VTUNE', '1')
--- a/moz.configure
+++ b/moz.configure
@@ -15,38 +15,38 @@ include('build/moz.configure/checks.conf
# - Spidermonkey-specific options and rules should go in js/moz.configure.
# - etc.
# Multiprocess Firefox Testing UI - Nightly and Aurora
# To be removed in Bug 1003313
@depends(milestone)
def e10s_testing_only(milestone):
if not milestone.is_release:
- set_config('E10S_TESTING_ONLY', '1')
+ set_config('E10S_TESTING_ONLY', True)
set_define('E10S_TESTING_ONLY', '1')
option('--enable-artifact-builds', env='MOZ_ARTIFACT_BUILDS',
help='Download and use prebuilt binary artifacts.')
@depends('--enable-artifact-builds')
def artifact_builds(value):
if value:
imply_option('--disable-compile-environment')
- set_config('MOZ_ARTIFACT_BUILDS', '1')
+ set_config('MOZ_ARTIFACT_BUILDS', True)
return bool(value)
option('--disable-compile-environment',
help='Disable compiler/library checks')
@depends('--disable-compile-environment')
def compile_environment(value):
if value:
- set_config('COMPILE_ENVIRONMENT', '1')
+ set_config('COMPILE_ENVIRONMENT', True)
add_old_configure_assignment('COMPILE_ENVIRONMENT', '1')
return bool(value)
@depends('--help')
@advanced
def build_backends_choices(help):
from mozbuild.backend import backends
@@ -156,17 +156,17 @@ def yasm_asflags(yasm, target):
# not Windows or Mac is ELF.
if target.cpu == 'x86':
asflags = '-f elf32'
elif target.cpu == 'x86_64':
asflags = '-f elf64'
if asflags:
asflags += ' -rnasm -pnasm'
set_config('YASM_ASFLAGS', asflags)
- set_config('HAVE_YASM', '1')
+ set_config('HAVE_YASM', True)
# Until the YASM variable is not necessary in old-configure.
add_old_configure_assignment('YASM', '1')
return asflags
# Miscellaneous programs
# ==============================================================
check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
check_prog('TAR', ('gnutar', 'gtar', 'tar'))
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -22,44 +22,44 @@ def systrace(value, target):
option('--enable-jprof', env='MOZ_JPROF',
help='Enable jprof profiling tool (needs mozilla/tools/jprof)')
@depends('--enable-jprof')
def jprof(value):
if value:
- set_config('MOZ_JPROF', '1')
+ set_config('MOZ_JPROF', True)
set_define('MOZ_JPROF', '1')
imply_option('--enable-profiling')
@depends(target)
def sps_profiler(target):
if target.os == 'Android':
return target.cpu in ('arm', 'x86')
elif target.kernel == 'Linux':
return target.cpu in ('x86', 'x86_64')
return target.os in ('OSX', 'WINNT')
@depends(sps_profiler)
def sps_profiler_define(value):
if value:
- set_config('MOZ_ENABLE_PROFILER_SPS', '1')
+ set_config('MOZ_ENABLE_PROFILER_SPS', True)
set_define('MOZ_ENABLE_PROFILER_SPS', '1')
option('--enable-dmd', env='MOZ_DMD',
help='Enable Dark Matter Detector (heap profiler). '
'Also enables jemalloc, replace-malloc and profiling')
@depends('--enable-dmd')
def dmd(value):
if value:
- set_config('MOZ_DMD', '1')
+ set_config('MOZ_DMD', True)
set_define('MOZ_DMD', '1')
add_old_configure_assignment('MOZ_DMD', '1')
imply_option('--enable-profiling')
# Javascript engine
# ==============================================================
include('../js/moz.configure')
@@ -152,19 +152,19 @@ def x11(value, toolkit):
error('--without-x is only valid with --enable-default-toolkit=qt')
x11_toolkits = ('gtk2', 'gtk3', 'qt')
if value and value.origin != 'default' and toolkit not in x11_toolkits:
error('--with-x is only valid with --enable-default-toolkit={%s}'
% ','.join(x11_toolkits))
if value and toolkit in x11_toolkits:
- set_config('MOZ_ENABLE_XREMOTE', '1')
+ set_config('MOZ_ENABLE_XREMOTE', True)
set_define('MOZ_ENABLE_XREMOTE', '1')
- set_config('MOZ_X11', '1')
+ set_config('MOZ_X11', True)
set_define('MOZ_X11', '1')
add_old_configure_assignment('MOZ_X11', '1')
return value and toolkit in x11_toolkits
# GL Provider
# ==============================================================
@@ -183,33 +183,33 @@ def gl_provider(value, x11):
set_define('GL_PROVIDER_GLX', '1')
# PDF printing
# ==============================================================
@depends(toolkit)
def pdf_printing(toolkit):
if toolkit in ('windows', 'gtk2', 'gtk3', 'qt', 'android', 'gonk'):
- set_config('MOZ_PDF_PRINTING', '1')
+ set_config('MOZ_PDF_PRINTING', True)
set_config('PDF_SURFACE_FEATURE', '#define CAIRO_HAS_PDF_SURFACE 1')
else:
# CONFIGURE_SUBST_FILES need explicit empty values.
set_config('PDF_SURFACE_FEATURE', '')
# Event loop instrumentation
# ==============================================================
option(env='MOZ_INSTRUMENT_EVENT_LOOP',
help='Force-enable event loop instrumentation')
@depends('MOZ_INSTRUMENT_EVENT_LOOP', toolkit)
def instrument_event_loop(value, toolkit):
if value or (toolkit in ('windows', 'gtk2', 'gtk3', 'cocoa', 'android',
'gonk') and value.origin == 'default'):
- set_config('MOZ_INSTRUMENT_EVENT_LOOP', '1')
+ set_config('MOZ_INSTRUMENT_EVENT_LOOP', True)
set_define('MOZ_INSTRUMENT_EVENT_LOOP', '1')
# Fontconfig Freetype
# ==============================================================
option(env='USE_FC_FREETYPE',
help='Force-enable the use of fontconfig freetype')
@@ -220,17 +220,17 @@ def fc_freetype(value, toolkit):
add_old_configure_assignment('USE_FC_FREETYPE', '1')
# Apple platform decoder support
# ==============================================================
@depends(toolkit)
def applemedia(toolkit):
if toolkit in ('cocoa', 'uikit'):
- set_config('MOZ_APPLEMEDIA', '1')
+ set_config('MOZ_APPLEMEDIA', True)
set_define('MOZ_APPLEMEDIA', '1')
add_old_configure_assignment('MOZ_APPLEMEDIA', '1')
return True
return False
# Windows Media Foundation support
# ==============================================================
@@ -244,51 +244,51 @@ def wmf(value, target):
# Enable Windows Media Foundation support by default.
# Note our minimum SDK version is Windows 7 SDK, so we are (currently)
# guaranteed to have a recent-enough SDK to build WMF.
enabled = target.os == 'WINNT'
if enabled and target.os != 'WINNT':
error('Cannot enable Windows Media Foundation support on %s'
% target.os)
if enabled:
- set_config('MOZ_WMF', '1')
+ set_config('MOZ_WMF', True)
set_define('MOZ_WMF', '1')
return enabled
# FFmpeg H264/AAC Decoding Support
# ==============================================================
option('--disable-ffmpeg',
help='Disable FFmpeg for fragmented H264/AAC decoding')
@depends('--disable-ffmpeg', target)
def ffmpeg(value, target):
enabled = bool(value)
if value.origin == 'default':
enabled = target.os not in ('Android', 'WINNT')
if enabled:
set_define('MOZ_FFMPEG', '1')
- set_config('MOZ_FFMPEG', '1')
+ set_config('MOZ_FFMPEG', True)
imply_option('--enable-fmp4', '--enable-ffmpeg')
return enabled
# Built-in fragmented MP4 support.
# ==============================================================
option('--disable-fmp4', env='MOZ_FMP4',
help='Disable support for in built Fragmented MP4 parsing')
@depends('--disable-fmp4', target, wmf, applemedia)
def fmp4(value, target, wmf, applemedia):
enabled = bool(value)
if value.origin == 'default':
# target.os == 'Android' includes all B2G versions
enabled = wmf or applemedia or target.os == 'Android'
if enabled:
- set_config('MOZ_FMP4', '1')
+ set_config('MOZ_FMP4', True)
set_define('MOZ_FMP4', '1')
add_old_configure_assignment('MOZ_FMP4', '1')
return enabled
# EME Support
# ==============================================================
option('--enable-eme', nargs='*', choices=('adobe',),
@@ -298,16 +298,16 @@ option('--enable-eme', nargs='*', choice
def eme(value, fmp4):
enabled = bool(value)
if value.origin == 'default':
enabled = enabled or fmp4
if enabled and not fmp4:
error('Encrypted Media Extension support requires '
'Fragmented MP4 support')
if enabled:
- set_config('MOZ_EME', '1')
+ set_config('MOZ_EME', True)
set_define('MOZ_EME', '1')
# Theoretically, we could pass `value` directly when it is a
# PositiveOptionValue, but somehow, the JSON serialization in configure.py
# outputs inconsistent data in some cases when we do (a closing bracket
# without an opening one).
set_config('MOZ_EME_MODULES', list(value) if value else [])
return enabled