Add bitcode and architectures to App.framework build ios framework command (#46130)
This commit is contained in:
@@ -79,18 +79,33 @@ Future<void> main() async {
|
||||
'App',
|
||||
));
|
||||
|
||||
final String aotSymbols = await dylibSymbols(path.join(
|
||||
final String appFrameworkPath = path.join(
|
||||
outputPath,
|
||||
'Debug',
|
||||
'App.framework',
|
||||
'App',
|
||||
));
|
||||
);
|
||||
final String aotSymbols = await dylibSymbols(appFrameworkPath);
|
||||
|
||||
if (aotSymbols.contains('architecture') ||
|
||||
aotSymbols.contains('_kDartVmSnapshot')) {
|
||||
throw TaskResult.failure('Debug App.framework contains AOT');
|
||||
}
|
||||
|
||||
final String debugAppArchs = await fileType(appFrameworkPath);
|
||||
|
||||
if (!debugAppArchs.contains('armv7')) {
|
||||
throw TaskResult.failure('Debug App.framework armv7 architecture missing');
|
||||
}
|
||||
|
||||
if (!debugAppArchs.contains('arm64')) {
|
||||
throw TaskResult.failure('Debug App.framework arm64 architecture missing');
|
||||
}
|
||||
|
||||
if (!debugAppArchs.contains('x86_64')) {
|
||||
throw TaskResult.failure('Debug App.framework x86_64 architecture missing');
|
||||
}
|
||||
|
||||
section('Check profile, release builds has Dart AOT dylib');
|
||||
|
||||
for (String mode in <String>['Profile', 'Release']) {
|
||||
@@ -116,6 +131,10 @@ Future<void> main() async {
|
||||
throw TaskResult.failure('$mode App.framework arm64 architecture missing');
|
||||
}
|
||||
|
||||
if (aotSymbols.contains('x86_64')) {
|
||||
throw TaskResult.failure('$mode App.framework contains x86_64 architecture');
|
||||
}
|
||||
|
||||
if (!aotSymbols.contains('_kDartVmSnapshot')) {
|
||||
throw TaskResult.failure('$mode App.framework missing Dart AOT');
|
||||
}
|
||||
|
||||
@@ -53,3 +53,7 @@ Future<Map<String, dynamic>> measureIosCpuGpu({
|
||||
Future<String> dylibSymbols(String pathToDylib) {
|
||||
return eval('nm', <String>['-g', pathToDylib]);
|
||||
}
|
||||
|
||||
Future<String> fileType(String pathToDylib) {
|
||||
return eval('file', <String>[pathToDylib]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user