build: fix build with Visual Studio 2019 (#20465)

This commit is contained in:
Jaime Bernardo 2019-10-08 20:49:38 +01:00 committed by Jeremy Apthorp
parent 94ec4ecabe
commit de3c1fae7f
9 changed files with 202 additions and 0 deletions

View file

@ -7,3 +7,4 @@ export_symbols_needed_for_windows_build.patch
workaround_an_undefined_symbol_error.patch
do_not_export_private_v8_symbols_on_windows.patch
revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch
include_string_in_v8_h.patch

View file

@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jaime Bernardo <jaime@janeasystems.com>
Date: Tue, 1 Oct 2019 20:06:03 +0100
Subject: Include string in v8.h
Explicitly #include<string> in v8.h, since std::string is referenced
in it. In the C++ STL shipped with Visual Studio 2019, none of the
headers included in v8.h ends up including the C++ string header, which
caused a compile error.
Bug: v8:9793
Change-Id: I84a133dd10dd6dcc7b70287af393e82cf0dc97df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1834321
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64074}
diff --git a/include/v8.h b/include/v8.h
index f0c47907292b9da438347276ac240541577899ad..a8010f4dadef1636697d08888a4c5e2da68f884a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -19,6 +19,7 @@
#include <stdint.h>
#include <stdio.h>
#include <memory>
+#include <string>
#include <type_traits>
#include <utility>
#include <vector>