Bug 1520677 - Remove unnecessary --help dependencies in python configure. r=dmajor
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 17 Jan 2019 03:34:54 +0000
changeset 514218 73f2517b40899e519a9dfb3b6dfc8dddac5866f8
parent 514217 671054606438709ebb65855558624cf280bcef55
child 514219 037b359d5bf2aba76dc917af828dfe8bc74bc394
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1520677 - Remove unnecessary --help dependencies in python configure. r=dmajor Differential Revision: https://phabricator.services.mozilla.com/D16777
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -24,19 +24,19 @@ def min_android_version(target):
           help='android platform version{|}',
-@depends('--with-android-version', min_android_version, '--help')
+@depends('--with-android-version', min_android_version)
 @imports(_from='__builtin__', _import='ValueError')
-def android_version(value, min_version, _):
+def android_version(value, min_version):
     if not value:
         # Someone has passed --without-android-version.
         die('--with-android-version cannot be disabled.')
         version = int(value[0])
     except ValueError:
         die('--with-android-version expects an integer value')
@@ -46,20 +46,18 @@ def android_version(value, min_version, 
             min_version, value[0])
     return version
 add_old_configure_assignment('android_version', android_version)
-@depends('--with-android-ndk', build_project, '--help')
-def ndk(value, build_project, help):
-    if help:
-        return
+@depends('--with-android-ndk', build_project)
+def ndk(value, build_project):
     if build_project == 'mobile/android' and not value:
         die('You must specify --with-android-ndk=/path/to/ndk when '
             'building mobile/android')
     if value:
         return value[0]
 set_config('ANDROID_NDK', ndk)
@@ -107,20 +105,20 @@ def ndk_minor_version(ndk_version):
     if minor:
         return minor
     die('Unexpected NDK version string: ' + ndk_version)
 set_config('ANDROID_NDK_MINOR_VERSION', ndk_minor_version)
-@depends(target, android_version, ndk, '--help')
+@depends(target, android_version, ndk)
 @checking('for android platform directory')
 @imports(_from='os.path', _import='isdir')
-def android_platform(target, android_version, ndk, _):
+def android_platform(target, android_version, ndk):
     if target.os != 'Android':
     if 'aarch64' == target.cpu:
         target_dir_name = 'arm64'
         target_dir_name = target.cpu
@@ -143,20 +141,20 @@ def android_platform(target, android_ver
             "configuration, it should be in %s" % platform_dir)
     return platform_dir
 add_old_configure_assignment('android_platform', android_platform)
-@depends(android_platform, ndk, target, '--help')
+@depends(android_platform, ndk, target)
 @checking('for android sysroot directory')
 @imports(_from='os.path', _import='isdir')
-def android_sysroot(android_platform, ndk, target, _):
+def android_sysroot(android_platform, ndk, target):
     if target.os != 'Android':
     # NDK r15 has both unified and non-unified headers, but we only support
     # non-unified for that NDK, so look for that first.
     search_dirs = [
         # (<if this directory exists>, <return this directory>)
         (os.path.join(android_platform, 'usr', 'include'), android_platform),
@@ -169,20 +167,20 @@ def android_sysroot(android_platform, nd
     die("Android sysroot directory not found in %s." %
         str([sysroot_dir for test_dir, sysroot_dir in search_dirs]))
 add_old_configure_assignment('android_sysroot', android_sysroot)
-@depends(android_platform, ndk, target, '--help')
+@depends(android_platform, ndk, target)
 @checking('for android system directory')
 @imports(_from='os.path', _import='isdir')
-def android_system(android_platform, ndk, target, _):
+def android_system(android_platform, ndk, target):
     if target.os != 'Android':
     # NDK r15 has both unified and non-unified headers, but we only support
     # non-unified for that NDK, so look for that first.
     search_dirs = [
         os.path.join(android_platform, 'usr', 'include'),
         os.path.join(ndk, 'sysroot', 'usr', 'include', target.toolchain),
@@ -193,21 +191,21 @@ def android_system(android_platform, ndk
             return system_dir
     die("Android system directory not found in %s." % str(search_dirs))
 add_old_configure_assignment('android_system', android_system)
-@depends(target, host, ndk, '--with-android-toolchain', '--help')
+@depends(target, host, ndk, '--with-android-toolchain')
 @checking('for the Android toolchain directory', lambda x: x or 'not found')
 @imports(_from='os.path', _import='isdir')
 @imports(_from='mozbuild.shellutil', _import='quote')
-def android_toolchain(target, host, ndk, toolchain, _):
+def android_toolchain(target, host, ndk, toolchain):
     if not ndk:
     if toolchain:
         return toolchain[0]
         if target.cpu == 'arm' and target.endianness == 'little':
             target_base = 'arm-linux-androideabi'
         elif target.cpu == 'x86':
@@ -246,19 +244,19 @@ def android_toolchain_prefix_base(target
     return target.toolchain
           help='Options compiler should pass for standard C++ library')
-@depends('STLPORT_CPPFLAGS', ndk, '--help')
+@depends('STLPORT_CPPFLAGS', ndk)
 @imports(_from='os.path', _import='isdir')
-def stlport_cppflags(value, ndk, _):
+def stlport_cppflags(value, ndk):
     if value and len(value):
         return value.split()
     if not ndk:
     ndk_base = os.path.join(ndk, 'sources', 'cxx-stl')
     cxx_base = os.path.join(ndk_base, 'llvm-libc++')
     cxx_include = os.path.join(cxx_base, 'libcxx', 'include')
@@ -312,19 +310,19 @@ def android_toolchain_prefix(prefix_base
         return '%s/bin/%s-' % (toolchain, prefix_base)
 imply_option('--with-toolchain-prefix', android_toolchain_prefix,
 @depends(extra_toolchain_flags, android_toolchain,
-         android_toolchain_prefix_base, '--help')
+         android_toolchain_prefix_base)
 @imports(_from='os.path', _import='isdir')
-def bindgen_cflags_android(toolchain_flags, toolchain, toolchain_prefix, _):
+def bindgen_cflags_android(toolchain_flags, toolchain, toolchain_prefix):
     if not toolchain_flags:
     gcc_include = os.path.join(
         toolchain, 'lib', 'gcc', toolchain_prefix, '4.9.x')
     if not isdir(gcc_include):
         gcc_include = os.path.join(
             toolchain, 'lib', 'gcc', toolchain_prefix, '4.9')
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1632,18 +1632,18 @@ add_old_configure_assignment('MOZ_LTO_CF
 add_old_configure_assignment('MOZ_LTO_LDFLAGS', lto.ldflags)
 # ==============================================================
 js_option('--enable-address-sanitizer', help='Enable Address Sanitizer')
-@depends_if('--enable-address-sanitizer', '--help')
-def asan(value, _):
+def asan():
     return True
 add_old_configure_assignment('MOZ_ASAN', asan)
 # ==============================================================
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -188,18 +188,18 @@ set_config('L10NBASEDIR', l10n_base)
 # config.guess, which we want to avoid. Even better, we could actually set
 # `choices` depending on the target, but that doesn't pan out for the same
 # reason.
 option('--enable-default-toolkit', nargs=1,
        choices=('cairo-windows', 'cairo-gtk3', 'cairo-gtk3-wayland',
                 'cairo-cocoa', 'cairo-uikit', 'cairo-android'),
        help='Select default toolkit')
-@depends('--enable-default-toolkit', target, '--help')
-def full_toolkit(value, target, _):
+@depends('--enable-default-toolkit', target)
+def full_toolkit(value, target):
     # Define possible choices for each platform. The default is the first one
     # listed when there are several.
     if target.os == 'WINNT':
         platform_choices = ('cairo-windows',)
     elif target.os == 'OSX':
         platform_choices = ('cairo-cocoa',)
     elif target.os == 'iOS':
         platform_choices = ('cairo-uikit',)