chromium-src-build/toolchain
Nico Weber 66371a176b Teach midl.py to replace the main class GUID at file-copy time.
Remoting uses a GUID that changes over time for its main class.
midl.py currently just copies over fixed precomputed outputs.
(midl.exe is Windows-only, and we want to be able to build on non-Win).

To make things work, give midl.py a dynamic_guid arg, that, when set,
makes midl.py replace the GUID in the checked-in output with a dynamic
GUID.

The tricky bit is that the GUID also ends up in the binary .tlb file,
which is an undocumented file format. I figured out most of the file
format in https://chromium-review.googlesource.com/c/chromium/src/+/693223
(see around line 26s for an overview). For a dynamic GUID, two things
need to happen:

1. Find where the GUID of the main clas is in the .tlb file, replace it
2. There's a global hash table of all GUIDs. Recompute this hash table
   after changing one of the GUIDs.

midl.py still compares the output of "copy file with replaced GUID"
with the output of running midl.exe when on Windows, which verifies
that the tlb modification does the same thing that midl.exe does.
(But the diff now needs to compare the post-copy files instead of
the checked-in files.)

TBR=sergeyu

Bug: 761839
Change-Id: I1fcc3202df3cc4f80a41087668c2c60110fa142c
Reviewed-on: https://chromium-review.googlesource.com/707197
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#507860}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fc10d000f13aae3905207b94325a6ffa6b44cfe4
2017-10-11 01:54:00 +00:00
..
aix For building v8 using gn on aix_ppc64, linux_s390x and linux_ppc64(both LE and BE). 2017-05-10 04:55:56 +00:00
android Android: Use eu-strip instead of binutils strip to strip executables and DSOs. 2017-08-31 18:44:52 +00:00
cros Add a way for CrOS toolchains to set custom flags for the nacl bootstrap. 2016-08-11 16:30:33 +00:00
fuchsia [fuchsia] Provide aarch64 (aka arm64) toolchain definition for Fuchsia 2017-10-05 17:48:07 +00:00
linux MIPS[64]: Add MIPS support to GN for V8 2017-10-05 22:39:18 +00:00
mac Add workaround for bug in actool in Xcode 9.1 β. 2017-10-03 13:25:59 +00:00
nacl Remove dependency on scan-build wrapper script for analysis builds. 2017-03-10 19:47:21 +00:00
win Teach midl.py to replace the main class GUID at file-copy time. 2017-10-11 01:54:00 +00:00
BUILD.gn Use explicit pool to define concurrent_links jobs. 2016-08-04 18:44:40 +00:00
OWNERS
cc_wrapper.gni Use new toolchain_args variable in GN. 2016-08-09 22:23:24 +00:00
clang_static_analyzer.gni Add Clang static analyzer support to Clang toolchain defs in GN. 2017-01-24 23:25:01 +00:00
clang_static_analyzer_wrapper.py Add static analysis support to Win Clang builds 2017-03-16 21:39:51 +00:00
concurrent_links.gni Reduce link concurrency for builds using sanitizer coverage instrumentation. 2017-10-03 17:01:50 +00:00
cros_toolchain.gni Add a way for CrOS toolchains to set custom flags for the nacl bootstrap. 2016-08-11 16:30:33 +00:00
gcc_ar_wrapper.py build: Fix common misspellings 2017-08-01 09:03:13 +00:00
gcc_compile_wrapper.py Reland of Enable whitelist generation for official builds. 2016-08-24 21:22:12 +00:00
gcc_link_wrapper.py Android: Use eu-strip instead of binutils strip to strip executables and DSOs. 2017-08-31 18:44:52 +00:00
gcc_solink_wrapper.py Android: Use eu-strip instead of binutils strip to strip executables and DSOs. 2017-08-31 18:44:52 +00:00
gcc_toolchain.gni Enable toolchains to define extra asm flags 2017-09-15 18:05:55 +00:00
get_concurrent_links.py Fix pylint warning. 2016-09-07 02:34:50 +00:00
goma.gni Make goma a bit less broken in win cross builds. 2017-08-31 22:14:31 +00:00
nacl_toolchain.gni Add back clang requirement assert for use_clang_coverage flag. 2017-10-06 20:35:04 +00:00
toolchain.gni build: Remove allow_posix_link_time_opt and make use_thin_lto depend on is_cfi. 2017-10-03 02:12:52 +00:00
wrapper_utils.py Output a linker map file for official builds 2017-03-08 17:23:01 +00:00