diff --git a/sky/tools/create_full_ios_framework.py b/sky/tools/create_full_ios_framework.py index 5166bb5099c6d..7c1ae0f0a9f4e 100644 --- a/sky/tools/create_full_ios_framework.py +++ b/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/sky/tools/create_macos_gen_snapshots.py b/sky/tools/create_macos_gen_snapshots.py index 165ab28072aa2..eae0f70aac693 100755 --- a/sky/tools/create_macos_gen_snapshots.py +++ b/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__':