Check for iOS simulator SDK during AOT validation instead of assuming x86 (#72834)
This commit is contained in:
@@ -66,10 +66,14 @@ abstract class AotAssemblyBase extends Target {
|
||||
if (targetPlatform != TargetPlatform.ios) {
|
||||
throw Exception('aot_assembly is only supported for iOS applications.');
|
||||
}
|
||||
if (darwinArchs.contains(DarwinArch.x86_64)) {
|
||||
|
||||
final String sdkRoot = environment.defines[kSdkRoot];
|
||||
final EnvironmentType environmentType =
|
||||
environmentTypeFromSdkroot(environment.fileSystem.directory(sdkRoot));
|
||||
if (environmentType == EnvironmentType.simulator) {
|
||||
throw Exception(
|
||||
'release/profile builds are only supported for physical devices. '
|
||||
'attempted to build for $darwinArchs.'
|
||||
'attempted to build for simulator.'
|
||||
);
|
||||
}
|
||||
final String codeSizeDirectory = environment.defines[kCodeSizeDirectory];
|
||||
@@ -95,7 +99,7 @@ abstract class AotAssemblyBase extends Target {
|
||||
mainPath: environment.buildDir.childFile('app.dill').path,
|
||||
outputPath: environment.fileSystem.path.join(buildOutputPath, getNameForDarwinArch(darwinArch)),
|
||||
darwinArch: darwinArch,
|
||||
sdkRoot: environment.defines[kSdkRoot],
|
||||
sdkRoot: sdkRoot,
|
||||
bitcode: bitcode,
|
||||
quiet: true,
|
||||
splitDebugInfo: splitDebugInfo,
|
||||
|
||||
Reference in New Issue
Block a user