Bug 1577749 - Fix check_sccache_version when using RUSTC_WRAPPER. r=jwatt a=Aryx
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 30 Aug 2019 12:22:12 +0000
changeset 554778 92c38343d239347166b17935daba3078876dc5be
parent 554586 f529796a87c2e6ef2db08d7d8348500901ec4da9
child 554779 8d251dd4a9bebaa3e72a23d795122d4b12097ffc
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, Aryx
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 a=Aryx 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')