Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bb25e5c

Browse files
authored
Strip bitcode from gen_snapshot (#11528)
1 parent 37a4af0 commit bb25e5c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sky/tools/create_macos_gen_snapshots.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# found in the LICENSE file.
55

66
import argparse
7-
import shutil
7+
import subprocess
88
import sys
99
import os
1010

@@ -29,9 +29,10 @@ def main():
2929
print 'Cannot find i386 (armv7) gen_snapshot at', armv7_gen_snapshot
3030
return 1
3131

32-
shutil.copy(armv7_gen_snapshot, os.path.join(args.dst, 'gen_snapshot_armv7'))
33-
shutil.copy(arm64_gen_snapshot, os.path.join(args.dst, 'gen_snapshot_arm64'))
34-
32+
subprocess.check_call(['xcrun', 'bitcode_strip', '-r', armv7_gen_snapshot,
33+
'-o', os.path.join(args.dst, 'gen_snapshot_armv7')])
34+
subprocess.check_call(['xcrun', 'bitcode_strip', '-r', arm64_gen_snapshot,
35+
'-o', os.path.join(args.dst, 'gen_snapshot_arm64')])
3536

3637
if __name__ == '__main__':
3738
sys.exit(main())

0 commit comments

Comments
 (0)