From 12c871ca5fa931f80ba87d2c5f93387691fba398 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 15 Sep 2020 21:04:01 -0700 Subject: [PATCH] Verify Flutter clang module, add hook for verifying consumer warnings (flutter/engine#21203) --- .../flutter/shell/platform/darwin/ios/BUILD.gn | 17 +++++++++++++---- .../framework/Source/FlutterUmbrellaImport.m | 4 ++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn index e66f176459..775259c704 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn @@ -305,17 +305,26 @@ copy("copy_license") { outputs = [ "$root_out_dir/LICENSE" ] } -shared_library("copy_and_verify_framework_headers") { +shared_library("copy_and_verify_framework_module") { + framework_search_path = rebase_path("$root_out_dir") visibility = [ ":*" ] - include_dirs = [ "$_flutter_framework_headers_copy_dir" ] + cflags_objc = [ + "-F$framework_search_path", + "-fmodules", + "-Wnon-modular-include-in-framework-module", + ] sources = [ "framework/Source/FlutterUmbrellaImport.m" ] - deps = [ ":copy_framework_headers" ] + deps = [ + ":copy_framework_headers", + ":copy_framework_info_plist", + ":copy_framework_module_map", + ] } group("flutter_framework") { deps = [ - ":copy_and_verify_framework_headers", + ":copy_and_verify_framework_module", ":copy_dylib", ":copy_framework_icu", ":copy_framework_info_plist", diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m index b567d90dad..ea73b2d1e0 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m @@ -4,6 +4,6 @@ // The only point of this file is to ensure that the Flutter framework umbrella header can be // cleanly imported from an Objective-C translation unit. The target that uses this file copies the -// headers to a path that simulats how users would actually consume the framework outside of the +// headers to a path that simulates how users would actually import the framework outside of the // engine source root. -#import "Flutter.h" +#import