forked from firka/flutter
[flutter_tools] simplify symbol logic for iOS (#49628)
This commit is contained in:
@@ -57,13 +57,6 @@ Future<void> main() async {
|
||||
);
|
||||
}
|
||||
|
||||
if (await _hasDebugSymbols(ephemeralReleaseHostApp)) {
|
||||
return TaskResult.failure(
|
||||
"Ephemeral host app ${ephemeralReleaseHostApp.path}'s App.framework's "
|
||||
"debug symbols weren't stripped in release mode"
|
||||
);
|
||||
}
|
||||
|
||||
section('Clean build');
|
||||
|
||||
await inDirectory(projectDir, () async {
|
||||
@@ -97,12 +90,6 @@ Future<void> main() async {
|
||||
);
|
||||
}
|
||||
|
||||
if (!await _hasDebugSymbols(ephemeralProfileHostApp)) {
|
||||
return TaskResult.failure(
|
||||
"Ephemeral host app ${ephemeralProfileHostApp.path}'s App.framework does not contain debug symbols"
|
||||
);
|
||||
}
|
||||
|
||||
section('Clean build');
|
||||
|
||||
await inDirectory(projectDir, () async {
|
||||
@@ -406,26 +393,3 @@ Future<bool> _isAppAotBuild(Directory app) async {
|
||||
|
||||
return symbolTable.contains('kDartIsolateSnapshotInstructions');
|
||||
}
|
||||
|
||||
Future<bool> _hasDebugSymbols(Directory app) async {
|
||||
final String binary = path.join(
|
||||
app.path,
|
||||
'Frameworks',
|
||||
'App.framework',
|
||||
'App',
|
||||
);
|
||||
|
||||
final String symbolTable = await eval(
|
||||
'dsymutil',
|
||||
<String> [
|
||||
'--dump-debug-map',
|
||||
binary,
|
||||
],
|
||||
// The output is huge.
|
||||
printStdout: false,
|
||||
);
|
||||
|
||||
// Search for some random Flutter framework Dart function which should always
|
||||
// be in App.framework.
|
||||
return symbolTable.contains('BuildOwner_reassemble');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user