win: Try to make midl.py work with midl.exe 8.1.620
Bug: 756607 Change-Id: I78e1fdf2411c067efd5423987ab9812f14b93736 Reviewed-on: https://chromium-review.googlesource.com/680041 Reviewed-by: Scott Graham <scottmg@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#504255} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 7b9ef85965bb7f997a4564dba09e257d4d7d21ea
This commit is contained in:
Родитель
58898ff5d2
Коммит
e7d7f7845a
|
@ -427,13 +427,3 @@ config("target_winrt") {
|
|||
"/EHsc",
|
||||
]
|
||||
}
|
||||
|
||||
# Internal stuff --------------------------------------------------------------
|
||||
|
||||
# Config used by the MIDL template to disable warnings.
|
||||
config("midl_warnings") {
|
||||
if (is_clang) {
|
||||
# MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_".
|
||||
cflags = [ "-Wno-extra-tokens" ]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,5 @@ template("midl") {
|
|||
public_deps = [
|
||||
":$action_name",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/win:midl_warnings" ]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,16 @@ def ZapTimestamp(filename):
|
|||
'target_arch=(AMD64|X86) 8\.\d\d\.\d{4}',
|
||||
' Oicf, W1, Zp8, env=\\1 (32b run), target_arch=\\2 8.xx.xxxx',
|
||||
contents)
|
||||
# TODO(thakis): If we need more hacks than these, try to verify checked-in
|
||||
# outputs when we're using the hermetic toolchain.
|
||||
# midl.exe older than 8.1.622 omit '//' after #endif, fix that:
|
||||
contents = contents.replace('#endif !_MIDL_USE_GUIDDEF_',
|
||||
'#endif // !_MIDL_USE_GUIDDEF_')
|
||||
# midl.exe puts the midl version into code in one place. To have
|
||||
# predictable output, lie about the midl version if it's not 8.1.622.
|
||||
# This is unfortunate, but remember that there's beauty too in imperfection.
|
||||
contents = contents.replace('0x801026c, /* MIDL Version 8.1.620 */',
|
||||
'0x801026e, /* MIDL Version 8.1.622 */')
|
||||
open(filename, 'wb').write(contents)
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче