Backed out changeset 772250315e76 (bug 1390524) for build bustage in test_compile_checks.py: compiler_class() takes exactly 2 arguments (1 given). r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 17 Aug 2017 21:31:00 +0200
changeset 648507 2a790986a5716f9a070a601019de2a244f13e150
parent 648506 ed8427cb4342edaa7b0ec40a36afb3b4b8277d3e
child 648508 05358f0058a7a711dce865ea74af6ff451686657
child 648754 5029cc16a4d5bcc952c1f7c6b00d35d31ca8bab5
child 648757 9b488938cca915926189af8f82fa9a6d275294a1
push id74775
push userbmo:ted@mielczarek.org
push dateThu, 17 Aug 2017 21:15:41 +0000
reviewersbackout
bugs1390524
milestone57.0a1
backs out772250315e76877800a1969e0db9be13da736460
Backed out changeset 772250315e76 (bug 1390524) for build bustage in test_compile_checks.py: compiler_class() takes exactly 2 arguments (1 given). r=backout on a CLOSED TREE
build/moz.configure/compilers-util.configure
build/moz.configure/toolchain.configure
--- a/build/moz.configure/compilers-util.configure
+++ b/build/moz.configure/compilers-util.configure
@@ -2,19 +2,17 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 @template
 @imports('textwrap')
 @imports(_from='mozbuild.configure', _import='SandboxDependsFunction')
-def compiler_class(compiler, host_or_target):
-    is_target = host_or_target is target
-
+def compiler_class(compiler):
     class Compiler(SandboxDependsFunction):
         # Generates a test program and attempts to compile it. In case of
         # failure, the resulting check will return None. If the test program
         # succeeds, it will return the output of the test program.
         # - `includes` are the includes (as file names) that will appear at the
         #   top of the generated test program.
         # - `body` is the code that will appear in the main function of the
         #   generated test program. `return 0;` is appended to the function
@@ -44,18 +42,17 @@ def compiler_class(compiler, host_or_tar
             else:
                 def checking_fn(fn):
                     return fn
 
             @depends(self, dependable(flags), extra_toolchain_flags, when=when)
             @checking_fn
             def func(compiler, flags, extra_flags):
                 flags = flags or []
-                if is_target:
-                    flags += extra_flags or []
+                flags += extra_flags or []
                 flags.append('-c')
 
                 if try_invoke_compiler(
                     compiler.wrapper + [compiler.compiler] + compiler.flags,
                     compiler.language, source, flags,
                     onerror=onerror) is not None:
                     return True
 
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -804,17 +804,17 @@ def compiler(language, host_or_target, c
     if language == 'C':
         set_config(
             '%s_TYPE' % var, valid_compiler.type)
         add_old_configure_assignment(
             '%s_TYPE' % var, valid_compiler.type)
         add_old_configure_assignment(
             '%s_VERSION' % var, valid_compiler.version)
 
-    valid_compiler = compiler_class(valid_compiler, host_or_target)
+    valid_compiler = compiler_class(valid_compiler)
 
     def compiler_error():
         raise FatalCheckError('Failed compiling a simple %s source with %s'
                               % (language, what))
 
     valid_compiler.try_compile(check_msg='%s works' % what,
                                onerror=compiler_error)