Bug 1258618 - Use True instead of '1' for add_old_configure_assignment
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -617,22 +617,22 @@ def milestone(build_env):
set_config('GRE_MILESTONE', milestone)
is_nightly = is_release = False
if 'a1' in milestone:
set_config('NIGHTLY_BUILD', True)
set_define('NIGHTLY_BUILD', True)
- add_old_configure_assignment('NIGHTLY_BUILD', '1')
+ add_old_configure_assignment('NIGHTLY_BUILD', True)
is_nightly = True
elif 'a' not in milestone:
set_config('RELEASE_BUILD', True)
set_define('RELEASE_BUILD', True)
- add_old_configure_assignment('RELEASE_BUILD', '1')
+ add_old_configure_assignment('RELEASE_BUILD', True)
is_release = True
return namespace(version=milestone,
is_nightly=is_nightly,
is_release=is_release)
# This is temporary until js/src/configure and configure are merged.
# Use instead of option() in js/moz.configure
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -17,17 +17,17 @@ def building_js(build_project, help):
# 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', True)
- add_old_configure_assignment('JS_STANDALONE', '1')
+ add_old_configure_assignment('JS_STANDALONE', True)
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:
@@ -43,17 +43,17 @@ js_option('--disable-export-js', default
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', True)
- add_old_configure_assignment('JS_SHARED_LIBRARY', '1')
+ add_old_configure_assignment('JS_SHARED_LIBRARY', True)
else:
if export_js:
set_define('STATIC_EXPORTABLE_JS_API', True)
else:
set_define('STATIC_JS_API', True)
set_define('MOZ_STATIC_JS', True)
@@ -88,17 +88,17 @@ js_option('--enable-instruments', env='M
@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', True)
set_define('MOZ_INSTRUMENTS', True)
- add_old_configure_assignment('MOZ_INSTRUMENTS', '1')
+ add_old_configure_assignment('MOZ_INSTRUMENTS', True)
imply_option('--enable-profiling', reason='--enable-instruments')
js_option('--enable-callgrind', env='MOZ_CALLGRIND',
help='Enable callgrind profiling')
@depends('--enable-callgrind')
def callgrind(value):
@@ -111,17 +111,17 @@ js_option('--enable-profiling', env='MOZ
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', True)
set_define('MOZ_PROFILING', True)
- add_old_configure_assignment('MOZ_PROFILING', '1')
+ add_old_configure_assignment('MOZ_PROFILING', True)
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')
--- a/moz.configure
+++ b/moz.configure
@@ -37,17 +37,17 @@ def artifact_builds(value):
option('--disable-compile-environment',
help='Disable compiler/library checks')
@depends('--disable-compile-environment')
def compile_environment(value):
if value:
set_config('COMPILE_ENVIRONMENT', True)
- add_old_configure_assignment('COMPILE_ENVIRONMENT', '1')
+ add_old_configure_assignment('COMPILE_ENVIRONMENT', True)
return bool(value)
@depends('--help')
@advanced
def build_backends_choices(help):
from mozbuild.backend import backends
return tuple(backends)
@@ -158,17 +158,17 @@ def yasm_asflags(yasm, target):
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', True)
# Until the YASM variable is not necessary in old-configure.
- add_old_configure_assignment('YASM', '1')
+ add_old_configure_assignment('YASM', True)
return asflags
# Miscellaneous programs
# ==============================================================
check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
check_prog('TAR', ('gnutar', 'gtar', 'tar'))
check_prog('UNZIP', ('unzip',))
check_prog('XARGS', ('xargs',))
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -51,17 +51,17 @@ 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', True)
set_define('MOZ_DMD', True)
- add_old_configure_assignment('MOZ_DMD', '1')
+ add_old_configure_assignment('MOZ_DMD', True)
imply_option('--enable-profiling')
# Javascript engine
# ==============================================================
include('../js/moz.configure')
@@ -156,17 +156,17 @@ def x11(value, toolkit):
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', True)
set_define('MOZ_ENABLE_XREMOTE', True)
set_config('MOZ_X11', True)
set_define('MOZ_X11', True)
- add_old_configure_assignment('MOZ_X11', '1')
+ add_old_configure_assignment('MOZ_X11', True)
return value and toolkit in x11_toolkits
# GL Provider
# ==============================================================
option('--with-gl-provider', nargs=1, help='Set GL provider backend type')
@@ -212,27 +212,27 @@ def instrument_event_loop(value, toolkit
# ==============================================================
option(env='USE_FC_FREETYPE',
help='Force-enable the use of fontconfig freetype')
@depends('USE_FC_FREETYPE', toolkit)
def fc_freetype(value, toolkit):
if value or (toolkit in ('gtk2', 'gtk3', 'qt') and
value.origin == 'default'):
- add_old_configure_assignment('USE_FC_FREETYPE', '1')
+ add_old_configure_assignment('USE_FC_FREETYPE', True)
# Apple platform decoder support
# ==============================================================
@depends(toolkit)
def applemedia(toolkit):
if toolkit in ('cocoa', 'uikit'):
set_config('MOZ_APPLEMEDIA', True)
set_define('MOZ_APPLEMEDIA', True)
- add_old_configure_assignment('MOZ_APPLEMEDIA', '1')
+ add_old_configure_assignment('MOZ_APPLEMEDIA', True)
return True
return False
# Windows Media Foundation support
# ==============================================================
option('--disable-wmf',
help='Disable support for Windows Media Foundation')
@@ -280,17 +280,17 @@ option('--disable-fmp4', env='MOZ_FMP4',
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', True)
set_define('MOZ_FMP4', True)
- add_old_configure_assignment('MOZ_FMP4', '1')
+ add_old_configure_assignment('MOZ_FMP4', True)
return enabled
# EME Support
# ==============================================================
option('--enable-eme', nargs='*', choices=('adobe',),
help='Enable support for Encrypted Media Extensions')