diff --git a/engine/src/flutter/impeller/tools/build_metal_library.py b/engine/src/flutter/impeller/tools/build_metal_library.py index fbfae128e3..004d6b9dc5 100644 --- a/engine/src/flutter/impeller/tools/build_metal_library.py +++ b/engine/src/flutter/impeller/tools/build_metal_library.py @@ -31,7 +31,7 @@ def Main(): help="The source file to compile. Can be specified multiple times.") parser.add_argument("--optimize", action="store_true", default=False, help="If available optimizations must be applied to the compiled Metal sources.") - parser.add_argument("--platform", required=True, choices=["mac", "ios"], + parser.add_argument("--platform", required=True, choices=["mac", "ios", "ios-simulator"], help="Select the platform.") args = parser.parse_args() @@ -52,6 +52,11 @@ def Main(): "-sdk", "iphoneos", ] + elif args.platform == "ios-simulator": + command += [ + "-sdk", + "iphonesimulator", + ] command += [ "metal", diff --git a/engine/src/flutter/impeller/tools/impeller.gni b/engine/src/flutter/impeller/tools/impeller.gni index 162e7895c2..6e78086058 100644 --- a/engine/src/flutter/impeller/tools/impeller.gni +++ b/engine/src/flutter/impeller/tools/impeller.gni @@ -140,7 +140,11 @@ template("metal_library") { } if (is_ios) { - args += [ "--platform=ios" ] + if (use_ios_simulator) { + args += [ "--platform=ios-simulator" ] + } else { + args += [ "--platform=ios" ] + } } else if (is_mac) { args += [ "--platform=mac" ] } else {