Windows: Build the double_conversion target as C++17 (fixes 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
7c866328e0
commit
7653e9e04c
|
@ -477,5 +477,11 @@ patches = [
|
|||
# Windows: Fix ImportError: No module named win32file
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=1033106#c7
|
||||
'name': 'win_tool_wrapper_1033106',
|
||||
},
|
||||
{
|
||||
# Windows: Build the double_conversion target as C++17 to avoid export of
|
||||
# std::is_integral templates that should be inlined.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2819
|
||||
'name': 'win_double_conversion_2819',
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
diff --git base/third_party/double_conversion/BUILD.gn base/third_party/double_conversion/BUILD.gn
|
||||
index 0083efdcd9c8..6f647c31e28a 100644
|
||||
--- base/third_party/double_conversion/BUILD.gn
|
||||
+++ base/third_party/double_conversion/BUILD.gn
|
||||
@@ -9,6 +9,11 @@ config("config") {
|
||||
"-Wno-unused-const-variable",
|
||||
"-Wno-unused-function",
|
||||
]
|
||||
+
|
||||
+ # Build as C++17 to avoid export of templates that should be inlined.
|
||||
+ if (is_win) {
|
||||
+ cflags_cc = [ "/std:c++17" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
static_library("double_conversion") {
|
Loading…
Reference in New Issue