[diagnostics] Fix node-v8 build

Turning on V8_ENABLE_SYSTEM_INSTRUMENTATION by default has broken
node-v8 builds on Windows, tracked here:
https://github.com/nodejs/node-v8/issues/192. It looks like it is due
to the fact that Node uses pre-compiled headers, which undefines
some macros needed for the event trace APIs to work. (see
src/base/win32-headers.h)

Bug: v8:11043
Change-Id: I3a6caeaaabab59d42e14b79defb2e37efd9ad04d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2830550
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#74080}
This commit is contained in:
Sara Tang 2021-04-16 09:38:10 -10:00 committed by Commit Bot
parent c8e8f482f3
commit a154ce984a

View File

@ -6,6 +6,9 @@
#define V8_DIAGNOSTICS_SYSTEM_JIT_METADATA_WIN_H_
#include <Windows.h>
#ifndef VOID
#define VOID void
#endif
#include <TraceLoggingProvider.h>
#include <evntprov.h>
#include <evntrace.h> // defines TRACE_LEVEL_* and EVENT_TRACE_TYPE_*