[Impeller] Compile simulator specific Metal shader variants. (flutter/engine#33670)

This commit is contained in:
Chinmay Garde
2022-05-27 17:53:05 -07:00
committed by GitHub
parent c928cd3e6a
commit cc83eb1091
2 changed files with 11 additions and 2 deletions

View File

@@ -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",

View File

@@ -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 {