Make the Windows 10.0.19041 SDK compatible with clang-cl
The Windows 10.0.19041 SDK modifies module.h so that it passes a lambda to InitOnceExecuteOnce. This works poorly because it is not possible to specify the calling convention of a lambda, and the callback requires a specific and non-default calling convention. This code works with VC++ because VC++ lambdas provide all possible calling conventions. It works with 64-bit builds with clang-cl because there is only one calling convention. But it fails on 32-bit builds with clang-cl. This define tells module.h to use the old singleton technique. The Microsoft developer who wrote the new technique has been made aware. See the bug for details. This change is a NOP for packaged toolchain users until we switch the packaged toolchain to the new SDK, but it avoids problems for developers who install the new SDK and build with it. Bug: 1089996 Change-Id: I38d9748b9def3038320ee106676a1f5e60f7349f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2232766 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by:Jesse McKenna <jessemckenna@google.com> Reviewed-by:
David Bienvenu <davidbienvenu@google.com> Cr-Commit-Position: refs/heads/master@{#775746}
Showing
Please register or sign in to comment