Bug 1316844 - Remove unused dependencies. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 11 Nov 2016 12:52:37 +0900
changeset 322460 e9f19254a85d07fd2b4e3fda76210b355ac52b48
parent 322459 f45564cb091fb98a058f470de5e1f5857683870f
child 322461 f44dbf7e6f4c96d960a58ed77274eec619a87c8a
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewerschmanchester
bugs1316844
milestone52.0a1
Bug 1316844 - Remove unused dependencies. r=chmanchester
build/moz.configure/compile-checks.configure
build/moz.configure/init.configure
build/moz.configure/rust.configure
build/moz.configure/toolchain.configure
toolkit/moz.configure
--- a/build/moz.configure/compile-checks.configure
+++ b/build/moz.configure/compile-checks.configure
@@ -70,22 +70,22 @@ def check_header(header, language='C++',
 @template
 def check_headers(*headers, **kwargs):
     checks = []
     for header in headers:
         checks.append(check_header(header, **kwargs))
     return checks
 
 
-@depends(c_compiler)
-def warnings_cflags(c_compiler):
+@dependable
+def warnings_cflags():
     return []
 
-@depends(cxx_compiler)
-def warnings_cxxflags(cxx_compiler):
+@dependable
+def warnings_cxxflags():
     return []
 
 
 # Tests whether GCC or clang support the given warning flag, and if it is,
 # add it to the list of warning flags for the build.
 # - `warning` is the warning flag (e.g. -Wfoo)
 # - `compiler` (optional) is the compiler to test against (c_compiler or
 #   cxx_compiler, from toolchain.configure). When omitted, both compilers
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -487,18 +487,18 @@ add_old_configure_assignment('HAVE_64BIT
 
 # Autoconf needs these set
 @depends(host)
 def host_for_old_configure(host):
     return '--host=%s' % host.alias
 
 add_old_configure_arg(host_for_old_configure)
 
-@depends(host, target)
-def target_for_old_configure(host, target):
+@depends(target)
+def target_for_old_configure(target):
     target_alias = target.alias
     # old-configure does plenty of tests against $target and $target_os
     # and expects darwin for iOS, so make it happy.
     if target.os == 'iOS':
         target_alias = target_alias.replace('-ios', '-darwin')
     return '--target=%s' % target_alias
 
 add_old_configure_arg(target_for_old_configure)
@@ -754,20 +754,20 @@ def project_flag(env=None, set_for_old_c
 
 # milestone.is_nightly corresponds to cases NIGHTLY_BUILD is set.
 @depends(milestone, '--help')
 def enabled_in_nightly(milestone, _):
     return milestone.is_nightly
 
 # Set the MOZ_CONFIGURE_OPTIONS variable with all the options that
 # were passed somehow (environment, command line, mozconfig)
-@depends(mozconfig_options)
+@dependable
 @imports(_from='mozbuild.shellutil', _import='quote')
 @imports('__sandbox__')
-def all_configure_options(_):
+def all_configure_options():
     result = []
     previous = None
     for option in __sandbox__._options.itervalues():
         # __sandbox__._options contains items for both option.name and
         # option.env. But it's also an OrderedDict, meaning both are
         # consecutive.
         # Also ignore OLD_CONFIGURE and MOZCONFIG because they're not
         # interesting.
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -66,23 +66,23 @@ def rust_compiler(value, rustc, rustc_in
             version {} of the 'rustc' toolchain and make sure it is
             first in your path.
             You can verify this by typing 'rustc --version'.
             '''.format(version, min_version)))
         return True
 
 set_config('MOZ_RUST', rust_compiler)
 
-@depends(rust_compiler, rustc, target, cross_compiling)
+@depends(rust_compiler, rustc, target)
 @imports('os')
 @imports('subprocess')
 @imports(_from='mozbuild.configure.util', _import='LineIO')
 @imports(_from='mozbuild.shellutil', _import='quote')
 @imports(_from='tempfile', _import='mkstemp')
-def rust_target(rust_compiler, rustc, target, cross_compiling):
+def rust_target(rust_compiler, rustc, target):
     if rust_compiler:
         # Rust's --target options are similar to, but not exactly the same
         # as, the autoconf-derived targets we use.  An example would be that
         # Rust uses distinct target triples for targetting the GNU C++ ABI
         # and the MSVC C++ ABI on Win32, whereas autoconf has a single
         # triple and relies on the user to ensure that everything is
         # compiled for the appropriate ABI.  We need to perform appropriate
         # munging to get the correct option to rustc.
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -151,18 +151,18 @@ def using_compiler_wrapper(compiler_wrap
 set_config('MOZ_USING_COMPILER_WRAPPER', using_compiler_wrapper)
 
 
 # Cross-compilation related things.
 # ==============================================================
 js_option('--with-toolchain-prefix', env='TOOLCHAIN_PREFIX', nargs=1,
           help='Prefix for the target toolchain')
 
-@depends('--with-toolchain-prefix', target, host, cross_compiling)
-def toolchain_prefix(value, target, host, cross_compiling):
+@depends('--with-toolchain-prefix', target, cross_compiling)
+def toolchain_prefix(value, target, cross_compiling):
     if value:
         return tuple(value)
     if cross_compiling:
         return ('%s-' % target.toolchain, '%s-' % target.alias)
 
 @depends(toolchain_prefix, target)
 def first_toolchain_prefix(toolchain_prefix, target):
     # Pass TOOLCHAIN_PREFIX down to the build system if it was given from the
@@ -878,18 +878,18 @@ add_old_configure_assignment('MOZ_DEBUG_
 @depends(c_compiler, target)
 def libcxx_inline_visibility(c_compiler, target):
     if c_compiler.type == 'clang' and target.os == 'Android':
         return ''
 
 set_define('_LIBCPP_INLINE_VISIBILITY', libcxx_inline_visibility)
 set_define('_LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49', libcxx_inline_visibility)
 
-@depends(c_compiler, target, check_build_environment)
-def visibility_flags(c_compiler, target, env):
+@depends(target, check_build_environment)
+def visibility_flags(target, env):
     if target.os != 'WINNT':
         if target.kernel == 'Darwin':
             return ('-fvisibility=hidden', '-fvisibility-inlines-hidden')
         return ('-I%s/system_wrappers' % os.path.join(env.dist),
                 '-include',
                 '%s/config/gcc_hidden.h' % env.topsrcdir)
 
 @depends(target, visibility_flags)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -788,18 +788,18 @@ def skia_gpu(value, skia, target):
     if skia and value:
         return True
 
 set_config('MOZ_ENABLE_SKIA_GPU', skia_gpu)
 set_define('USE_SKIA_GPU', skia_gpu)
 
 option('--enable-skia-pdf', help='Enable Skia PDF')
 
-@depends('--enable-skia-pdf', skia, target)
-def skia_pdf(value, skia, target):
+@depends('--enable-skia-pdf', skia)
+def skia_pdf(value, skia):
     if value.origin == 'default':
         if not skia:
             return None
     elif value and not skia:
         die('Cannot enable Skia PDF without enabling Skia')
     if skia and value:
         return True