Cleanup propagation of codecvt warning suppression in FML. (#52966)
Previously, because the suppression was local, every user of the the header had to manually add the flag. Now the flag will be propagated to the targets automatically. This linked issue still needs to be fixed but the fix can now be more isolated.
diff --git a/fml/BUILD.gn b/fml/BUILD.gn
index d2d4a16..f7c2714 100644
--- a/fml/BUILD.gn
+++ b/fml/BUILD.gn
@@ -289,6 +289,13 @@
]
}
+config("string_conversion_config") {
+ if (is_win) {
+ # TODO(50053): Replace codecvt usage.
+ defines = [ "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING" ]
+ }
+}
+
source_set("string_conversion") {
sources = [
"string_conversion.cc",
@@ -304,14 +311,12 @@
"platform/win/wstring_conversion.cc",
"platform/win/wstring_conversion.h",
]
-
- # TODO(cbracken): https://github.com/flutter/flutter/issues/50053
- defines += [ "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING" ]
}
deps = [ ":build_config" ]
public_configs = [
+ ":string_conversion_config",
"//flutter:config",
"//flutter/common:flutter_config",
]
diff --git a/impeller/BUILD.gn b/impeller/BUILD.gn
index 141defe..35bb8f9 100644
--- a/impeller/BUILD.gn
+++ b/impeller/BUILD.gn
@@ -30,13 +30,6 @@
defines += [ "IMPELLER_ENABLE_VULKAN=1" ]
}
- if (is_win) {
- defines += [
- # TODO(dnfield): https://github.com/flutter/flutter/issues/50053
- "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING",
- ]
- }
-
if (impeller_enable_3d) {
defines += [ "IMPELLER_ENABLE_3D" ]
}