Bug 1259382 - Get a full path to the compiler wrapper. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 05 Apr 2016 14:05:59 +0900
changeset 293214 e3370e2233f6ac1f72880da995462cde1a0c98e6
parent 293213 b8b7fa0549657d31f7bdf907683d72dd76b83ba2
child 293215 f8cf0fe7c810ee49bcb4efb27405073ae6156971
push id30178
push usercbook@mozilla.com
push dateFri, 15 Apr 2016 09:42:06 +0000
treeherdermozilla-central@afd82f887093 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1259382
milestone48.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 1259382 - Get a full path to the compiler wrapper. r=ted In the near future, we are going to try running the compiler wrapper from python code, and that will work better if we have the full path to it.
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -92,23 +92,32 @@ ccache = check_prog('CCACHE', progs=(), 
 def using_ccache(ccache):
     return True
 
 set_config('MOZ_USING_CCACHE', using_ccache)
 
 @depends('--with-compiler-wrapper', ccache)
 @imports(_from='mozbuild.shellutil', _import='split', _as='shell_split')
 def compiler_wrapper(wrapper, ccache):
+    if wrapper:
+        raw_wrapper = wrapper[0]
+        wrapper = shell_split(raw_wrapper)
+        wrapper_program = find_program(wrapper[0])
+        if not wrapper_program:
+            die('Cannot find `%s` from the given compiler wrapper `%s`',
+                wrapper[0], raw_wrapper)
+        wrapper[0] = wrapper_program
+
     if ccache:
         if wrapper:
-            return tuple([ccache] + shell_split(wrapper[0]))
+            return tuple([ccache] + wrapper)
         else:
             return (ccache,)
     elif wrapper:
-        return tuple(shell_split(wrapper[0]))
+        return tuple(wrapper)
 
 add_old_configure_assignment('COMPILER_WRAPPER', compiler_wrapper)
 
 @depends_if(compiler_wrapper)
 def using_compiler_wrapper(compiler_wrapper):
     return True
 
 set_config('MOZ_USING_COMPILER_WRAPPER', using_compiler_wrapper)