From a06a176d9f4b26d33c289618047085491141aa65 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 30 Jul 2024 18:09:18 -0700 Subject: [PATCH] [iOS][macOS] Eliminate use of bitcode_strip (flutter/engine#54240) Our executables are no longer built with bitcode enabled and thus `bitcode_strip -r SOURCE -o DEST` is just copying the file in question to the output location. Use of Bitcode was eliminated in Flutter in 2022. See linked issue for details. Issue: https://github.com/flutter/flutter/issues/107884 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- engine/src/flutter/sky/tools/create_full_ios_framework.py | 2 +- engine/src/flutter/sky/tools/create_macos_gen_snapshots.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/sky/tools/create_full_ios_framework.py b/engine/src/flutter/sky/tools/create_full_ios_framework.py index 7c1ae0f0a9..5166bb5099 100644 --- a/engine/src/flutter/sky/tools/create_full_ios_framework.py +++ b/engine/src/flutter/sky/tools/create_full_ios_framework.py @@ -243,7 +243,7 @@ def _generate_gen_snapshot(gen_snapshot_path, destination): print('Cannot find gen_snapshot at %s' % gen_snapshot_path) sys.exit(1) - subprocess.check_call(['xcrun', 'bitcode_strip', '-r', gen_snapshot_path, '-o', destination]) + shutil.copyfile(gen_snapshot_path, destination) if __name__ == '__main__': diff --git a/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py b/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py index eae0f70aac..165ab28072 100755 --- a/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py +++ b/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py @@ -5,6 +5,7 @@ # found in the LICENSE file. import argparse +import shutil import subprocess import sys import os @@ -69,7 +70,7 @@ def generate_gen_snapshot(gen_snapshot_path, destination): print('Cannot find gen_snapshot at %s' % gen_snapshot_path) sys.exit(1) - subprocess.check_call(['xcrun', 'bitcode_strip', '-r', gen_snapshot_path, '-o', destination]) + shutil.copyfile(gen_snapshot_path, destination) if __name__ == '__main__':