From 8a06eaf695090049efdafc7129b6d91bea238e35 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:12:47 +0000 Subject: [PATCH] Reverts "[iOS][macOS] Eliminate use of bitcode_strip (#54240)" (flutter/engine#54250) Reverts: flutter/engine#54240 Initiated by: zanderso Reason for reverting: Looks like some issue with file permissions https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20plugin_test_macos/19179/overview Original PR Author: cbracken Reviewed By: {zanderso} This change reverts the following previous change: 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, 2 insertions(+), 3 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 5166bb5099c..7c1ae0f0a9f 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) - shutil.copyfile(gen_snapshot_path, destination) + subprocess.check_call(['xcrun', 'bitcode_strip', '-r', gen_snapshot_path, '-o', 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 165ab28072a..eae0f70aac6 100755 --- a/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py +++ b/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py @@ -5,7 +5,6 @@ # found in the LICENSE file. import argparse -import shutil import subprocess import sys import os @@ -70,7 +69,7 @@ def generate_gen_snapshot(gen_snapshot_path, destination): print('Cannot find gen_snapshot at %s' % gen_snapshot_path) sys.exit(1) - shutil.copyfile(gen_snapshot_path, destination) + subprocess.check_call(['xcrun', 'bitcode_strip', '-r', gen_snapshot_path, '-o', destination]) if __name__ == '__main__':