[Impeller] Compile simulator specific Metal shader variants. (flutter/engine#33670)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user