Use accessibility_config for accessibility/ax (flutter/engine#29275)

//flutter/third_party/accessiblity/ax/ax_event_generator.cc includes the
AXEventGenerator::Iterator class which subclasses std::iterator, which
triggers an MSVC C++17 deprecation warning. This warning, can be
suppressed by defining _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
which is already done in the accessibility_config config.

Also updates the TODO to reference the issue tracking the cleanup and
removal of that definition.

Issue: https://github.com/flutter/flutter/issues/92229
This commit is contained in:
Chris Bracken 2021-10-21 09:42:57 -07:00 committed by GitHub
parent 0dac69cfbd
commit 8af486c93a
2 changed files with 4 additions and 3 deletions

View File

@ -7,11 +7,11 @@ import("//flutter/testing/testing.gni")
config("accessibility_config") {
visibility = [
":*",
"//flutter/shell/platform/common:common_cpp_accessibility",
"//flutter/third_party/accessibility/*",
]
if (is_win) {
# TODO: std::iterator class template is deprecated in C++17
# TODO(cbracken): https://github.com/flutter/flutter/issues/92229
defines = [ "_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING" ]
}
include_dirs = [ "//flutter/third_party/accessibility" ]

View File

@ -6,7 +6,8 @@ import("//flutter/common/config.gni")
source_set("ax") {
visibility = [ "//flutter/third_party/accessibility/*" ]
include_dirs = [ "//flutter/third_party/accessibility" ]
public_configs =
[ "//flutter/third_party/accessibility:accessibility_config" ]
sources = [
"platform/ax_platform_node.cc",