Bug 1577749 - Fix check_sccache_version when using RUSTC_WRAPPER. r=jwatt
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 30 Aug 2019 12:22:12 +0000
changeset 554611 cd8cfdc6b5b3d0ce775afda2bb3c443451baa20f
parent 554610 b541c2200a393c11f33dcf47e0f065dcfc2b0c2f
child 554612 24031facb68fd1a99c71d87a90416b9890dba484
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1577749
milestone70.0a1
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 1577749 - Fix check_sccache_version when using RUSTC_WRAPPER. r=jwatt Differential Revision: https://phabricator.services.mozilla.com/D44139
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -297,16 +297,17 @@ def using_ccache(ccache, ccache_is_sccac
 def using_sccache(ccache, ccache_is_sccache):
     return ccache and ccache_is_sccache
 
 js_option(env='RUSTC_WRAPPER', nargs=1,
           help='Wrap rust compilation with given tool')
 
 @depends(ccache, ccache_is_sccache, 'RUSTC_WRAPPER')
 @imports(_from='textwrap', _import='dedent')
+@imports('os')
 def check_sccache_version(ccache, ccache_is_sccache, rustc_wrapper):
     sccache_min_version = Version('0.2.10')
 
     def check_version(path):
         out = check_cmd_output(path, '--version')
         version = Version(out.rstrip().split()[-1])
         if version < sccache_min_version:
             die(dedent('''\
@@ -317,17 +318,17 @@ def check_sccache_version(ccache, ccache
             '''), sccache_min_version, path, version)
 
     if ccache and ccache_is_sccache:
         check_version(ccache)
 
     if (rustc_wrapper and
         (os.path.splitext(os.path.basename(rustc_wrapper[0]))[0].lower() ==
          'sccache')):
-        check_version(rustc_wrapper)
+        check_version(rustc_wrapper[0])
 
 set_config('MOZ_USING_CCACHE', using_ccache)
 set_config('MOZ_USING_SCCACHE', using_sccache)
 
 option(env='SCCACHE_VERBOSE_STATS',
        help='Print verbose sccache stats after build')