From 8af486c93ae0a8b755755f4eafe2f33a12341d5f Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 21 Oct 2021 09:42:57 -0700 Subject: [PATCH] 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 --- engine/src/flutter/third_party/accessibility/BUILD.gn | 4 ++-- engine/src/flutter/third_party/accessibility/ax/BUILD.gn | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/third_party/accessibility/BUILD.gn b/engine/src/flutter/third_party/accessibility/BUILD.gn index efdc96c7d5b..1295f7aed34 100644 --- a/engine/src/flutter/third_party/accessibility/BUILD.gn +++ b/engine/src/flutter/third_party/accessibility/BUILD.gn @@ -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" ] diff --git a/engine/src/flutter/third_party/accessibility/ax/BUILD.gn b/engine/src/flutter/third_party/accessibility/ax/BUILD.gn index 8f9f87a5f55..3c234b72344 100644 --- a/engine/src/flutter/third_party/accessibility/ax/BUILD.gn +++ b/engine/src/flutter/third_party/accessibility/ax/BUILD.gn @@ -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",