Update Skia build config to not override the C++ standard.
This updates skia/BUILD.gn with https://crrev.com/931521 and
https://crrev.com/932025, so building Skia uses the same C++ standard as
the rest of the build, just like in Chromium.
Change-Id: I1dcc00927950b94c76c6877efc68a879ee5c7164
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/102030
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: K. Moon <kmoon@chromium.org>
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 4bbef90..1e2bb22 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -69,6 +69,11 @@
config("skia_library_config") {
defines = []
+ # Skia uses C++17 language features in its internal code. Previously Skia was built with
+ # "-std=c++17". See http://crbug.com/1257145 for why this was a bad idea.
+ cflags_cc = [ "-Wno-c++17-extensions" ]
+ cflags_objcc = [ "-Wno-c++17-extensions" ]
+
if (is_component_build) {
defines += [ "SKIA_IMPLEMENTATION=1" ]
}
@@ -137,10 +142,6 @@
"/wd5041", # out-of-line definition for constexpr static data member is
# not needed and is deprecated in C++17
]
- cflags_cc = [ "/std:c++17" ]
- } else {
- cflags_cc = [ "-std=c++17" ]
- cflags_objcc = [ "-std=c++17" ]
}
}