Windows: Build the pe_image target as C++17 (see issue #2819)
This works around a bug in the Visual C++ standard library where the std::is_integral templates are exported instead of inlined when building with C++14. See also https://bugs.llvm.org/show_bug.cgi?id=42027.
This commit is contained in:
parent
e472228f29
commit
294eb75355
|
@ -488,10 +488,10 @@ patches = [
|
||||||
'name': 'win_tool_wrapper_1033106',
|
'name': 'win_tool_wrapper_1033106',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# Windows: Build the double_conversion target as C++17 to avoid export of
|
# Windows: Build targets as C++17 to avoid export of std::is_integral
|
||||||
# std::is_integral templates that should be inlined.
|
# templates in cef_sandbox that should be inlined.
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/2819
|
# https://bitbucket.org/chromiumembedded/cef/issues/2819
|
||||||
'name': 'win_double_conversion_2819',
|
'name': 'win_cpp17_msvc_sandbox_2819',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# libxml access is now limited to targets audited by the Security Team.
|
# libxml access is now limited to targets audited by the Security Team.
|
||||||
|
|
|
@ -14,3 +14,15 @@ index 0083efdcd9c8..6f647c31e28a 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
static_library("double_conversion") {
|
static_library("double_conversion") {
|
||||||
|
diff --git base/win/BUILD.gn base/win/BUILD.gn
|
||||||
|
index 33a38267a658..0d54f224d31c 100644
|
||||||
|
--- base/win/BUILD.gn
|
||||||
|
+++ base/win/BUILD.gn
|
||||||
|
@@ -31,4 +31,7 @@ static_library("pe_image") {
|
||||||
|
"pe_image.cc",
|
||||||
|
"pe_image.h",
|
||||||
|
]
|
||||||
|
+
|
||||||
|
+ # Build as C++17 to avoid export of templates that should be inlined.
|
||||||
|
+ cflags_cc = [ "/std:c++17" ]
|
||||||
|
}
|
Loading…
Reference in New Issue