From 223dbba0c6a4063846bdd41e8a98199aed3b4c9d Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:24:17 -0600 Subject: [PATCH] Process FlutterMacOS.framework before creating xcframework (flutter/engine#51023) Process (including stripping) FlutterMacOS.framework before creating it as an xcframework. Should fix https://github.com/flutter/flutter/issues/144251. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- engine/src/flutter/sky/tools/create_macos_framework.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/sky/tools/create_macos_framework.py b/engine/src/flutter/sky/tools/create_macos_framework.py index 457a67e1cf..0b690e1470 100755 --- a/engine/src/flutter/sky/tools/create_macos_framework.py +++ b/engine/src/flutter/sky/tools/create_macos_framework.py @@ -100,11 +100,13 @@ def main(): find_subprocess.wait() xargs_subprocess.wait() + process_framework(dst, args, fat_framework, fat_framework_binary) + # Create XCFramework from the arm64 and x64 fat framework. xcframeworks = [fat_framework] create_xcframework(location=dst, name='FlutterMacOS', frameworks=xcframeworks) - process_framework(dst, args, fat_framework, fat_framework_binary) + zip_framework(dst, args) return 0 @@ -168,6 +170,8 @@ def process_framework(dst, args, fat_framework, fat_framework_binary): subprocess.check_call(['strip', '-x', '-S', fat_framework_binary]) + +def zip_framework(dst, args): # Zip FlutterMacOS.framework. if args.zip: filepath_with_entitlements = ''