diff --git a/engine/src/flutter/ci/builders/mac_host_engine.json b/engine/src/flutter/ci/builders/mac_host_engine.json index a2f979bf4d..a4ed772663 100644 --- a/engine/src/flutter/ci/builders/mac_host_engine.json +++ b/engine/src/flutter/ci/builders/mac_host_engine.json @@ -557,10 +557,10 @@ "parameters": [ "--dst", "out/debug/snapshot", - "--arm64-out-dir", - "out/ci/mac_debug_arm64", - "--x64-out-dir", - "out/ci/host_debug", + "--arm64-path", + "out/ci/mac_debug_arm64/clang_x64/gen_snapshot", + "--x64-path", + "out/ci/host_debug/gen_snapshot", "--zip" ], "script": "flutter/sky/tools/create_macos_gen_snapshots.py" @@ -570,10 +570,10 @@ "parameters": [ "--dst", "out/profile/snapshot", - "--arm64-out-dir", - "out/ci/mac_profile_arm64", - "--x64-out-dir", - "out/ci/host_profile", + "--arm64-path", + "out/ci/mac_profile_arm64/clang_x64/gen_snapshot", + "--x64-path", + "out/ci/host_profile/gen_snapshot", "--zip" ], "script": "flutter/sky/tools/create_macos_gen_snapshots.py" @@ -583,10 +583,10 @@ "parameters": [ "--dst", "out/release/snapshot", - "--arm64-out-dir", - "out/ci/mac_release_arm64", - "--x64-out-dir", - "out/ci/host_release", + "--arm64-path", + "out/ci/mac_release_arm64/clang_x64/gen_snapshot", + "--x64-path", + "out/ci/host_release/gen_snapshot", "--zip" ], "script": "flutter/sky/tools/create_macos_gen_snapshots.py" diff --git a/engine/src/flutter/ci/builders/mac_ios_engine.json b/engine/src/flutter/ci/builders/mac_ios_engine.json index 14ec33ce16..163b6a6868 100644 --- a/engine/src/flutter/ci/builders/mac_ios_engine.json +++ b/engine/src/flutter/ci/builders/mac_ios_engine.json @@ -519,8 +519,8 @@ "parameters": [ "--dst", "out/release", - "--arm64-out-dir", - "out/ci/ios_release" + "--arm64-path", + "out/ci/ios_release/clang_x64/gen_snapshot" ], "script": "flutter/sky/tools/create_macos_gen_snapshots.py", "language": "python3" 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 92b6157722..eae0f70aac 100755 --- a/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py +++ b/engine/src/flutter/sky/tools/create_macos_gen_snapshots.py @@ -18,9 +18,8 @@ def main(): ) parser.add_argument('--dst', type=str, required=True) - parser.add_argument('--clang-dir', type=str, default='clang_x64') - parser.add_argument('--x64-out-dir', type=str) - parser.add_argument('--arm64-out-dir', type=str) + parser.add_argument('--x64-path', type=str) + parser.add_argument('--arm64-path', type=str) parser.add_argument('--zip', action='store_true', default=False) args = parser.parse_args() @@ -31,21 +30,17 @@ def main(): if not os.path.exists(dst): os.makedirs(dst) - if args.x64_out_dir: - x64_out_dir = ( - args.x64_out_dir - if os.path.isabs(args.x64_out_dir) else os.path.join(buildroot_dir, args.x64_out_dir) - ) - generate_gen_snapshot(x64_out_dir, os.path.join(dst, 'gen_snapshot_x64')) + if args.x64_path: + x64_path = args.x64_path + if not os.path.isabs(args.x64_path): + x64_path = os.path.join(buildroot_dir, args.x64_path) + generate_gen_snapshot(x64_path, os.path.join(dst, 'gen_snapshot_x64')) - if args.arm64_out_dir: - arm64_out_dir = ( - args.arm64_out_dir - if os.path.isabs(args.arm64_out_dir) else os.path.join(buildroot_dir, args.arm64_out_dir) - ) - generate_gen_snapshot( - os.path.join(arm64_out_dir, args.clang_dir), os.path.join(dst, 'gen_snapshot_arm64') - ) + if args.arm64_path: + arm64_path = args.arm64_path + if not os.path.isabs(args.arm64_path): + arm64_path = os.path.join(buildroot_dir, args.arm64_path) + generate_gen_snapshot(arm64_path, os.path.join(dst, 'gen_snapshot_arm64')) if args.zip: zip_archive(dst) @@ -69,13 +64,12 @@ def zip_archive(dst): ], cwd=dst) -def generate_gen_snapshot(directory, destination): - gen_snapshot_dir = os.path.join(directory, 'gen_snapshot') - if not os.path.isfile(gen_snapshot_dir): - print('Cannot find gen_snapshot at %s' % gen_snapshot_dir) +def generate_gen_snapshot(gen_snapshot_path, destination): + if not os.path.isfile(gen_snapshot_path): + print('Cannot find gen_snapshot at %s' % gen_snapshot_path) sys.exit(1) - subprocess.check_call(['xcrun', 'bitcode_strip', '-r', gen_snapshot_dir, '-o', destination]) + subprocess.check_call(['xcrun', 'bitcode_strip', '-r', gen_snapshot_path, '-o', destination]) if __name__ == '__main__':