Bug 1290040 - Use full path for mt.exe. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 29 Jul 2016 23:23:45 +0900
changeset 394633 e6d4e3c4573ee715715b33701ebf4a04b043af0f
parent 394632 2c032d09cef47f0cfe5a41bf20c1503dbf60d4bd
child 394634 066b6a8d096b806d61b4267b7432f7598ae030ed
push id24612
push userbmo:mh+mozilla@glandium.org
push dateSat, 30 Jul 2016 04:51:39 +0000
reviewersgps
bugs1290040
milestone50.0a1
Bug 1290040 - Use full path for mt.exe. r?gps Now that check_prog, through find_program, returns paths that the build system can handle, we don't need MT to just be "mt.exe". However, we still need the PATH to be altered for the other tools we're not checking in python configure yet (e.g. midl). We also still need PATH altered for the compiler itself, because for e.g. the amd_x86 version, a necessary DLL is in the amd directory, which means PATH always needs to be altered for cl.exe.
build/moz.configure/windows.configure
--- a/build/moz.configure/windows.configure
+++ b/build/moz.configure/windows.configure
@@ -350,20 +350,18 @@ def sdk_bin_path(valid_windows_sdk_dir):
         os.path.join(valid_windows_sdk_dir.path, 'bin', vc_host)
     ]
     if vc_host == 'x64':
         result.append(
             os.path.join(valid_windows_sdk_dir.path, 'bin', 'x86'))
     return result
 
 
-# Normally, we'd use `MT` instead of `_MT`, but for now, we want MT to only contain
-# mt.exe.
-mt = check_prog('_MT', depends_win()(lambda: ('mt.exe',)), what='mt',
-                input='MT', paths=sdk_bin_path)
+mt = check_prog('MT', depends_win()(lambda: ('mt.exe',)), input='MT',
+                paths=sdk_bin_path)
 
 
 # Check that MT is not something unexpected like "magnetic tape manipulation
 # utility".
 @depends_win(mt)
 @checking('whether MT is really Microsoft Manifest Tool', lambda x: bool(x))
 @imports('subprocess')
 def valid_mt(path):
@@ -373,17 +371,16 @@ def valid_mt(path):
                         if 'Microsoft (R) Manifest Tool' in l)
         if out:
               return path
     except subprocess.CalledProcessError:
         pass
     raise FatalCheckError('%s is not Microsoft Manifest Tool')
 
 
-set_config('MT', depends_if(valid_mt)(lambda x: os.path.basename(x)))
 set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
 
 
 # Normally, we'd just have CC, etc. set to absolute paths, but the build system
 # doesn't currently handle properly the case where the paths contain spaces.
 # Additionally, there's the issue described in toolchain.configure, in
 # valid_compiler().
 @depends_win(sdk_bin_path)