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.
--- 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)