This reverts commit 2175e64e4f.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'utils.dart';
|
||||
@@ -40,10 +42,17 @@ Future<bool> containsBitcode(String pathToBinary) async {
|
||||
final List<String> lines = LineSplitter.split(loadCommands).toList();
|
||||
lines.asMap().forEach((int index, String line) {
|
||||
if (line.contains('segname __LLVM') && lines.length - index - 1 > 3) {
|
||||
emptyBitcodeMarkerFound |= lines
|
||||
final String emptyBitcodeMarker = lines
|
||||
.skip(index - 1)
|
||||
.take(4)
|
||||
.any((String line) => line.contains(' size 0x0000000000000001'));
|
||||
.firstWhere(
|
||||
(String line) => line.contains(' size 0x0000000000000001'),
|
||||
orElse: () => null,
|
||||
);
|
||||
if (emptyBitcodeMarker != null) {
|
||||
emptyBitcodeMarkerFound = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
return !emptyBitcodeMarkerFound;
|
||||
@@ -70,16 +79,16 @@ Future<void> testWithNewIOSSimulator(
|
||||
workingDirectory: flutterDirectory.path,
|
||||
);
|
||||
|
||||
String? iOSSimRuntime;
|
||||
String iOSSimRuntime;
|
||||
|
||||
final RegExp iOSRuntimePattern = RegExp(r'iOS .*\) - (.*)');
|
||||
|
||||
for (final String runtime in LineSplitter.split(availableRuntimes)) {
|
||||
// These seem to be in order, so allow matching multiple lines so it grabs
|
||||
// the last (hopefully latest) one.
|
||||
final RegExpMatch? iOSRuntimeMatch = iOSRuntimePattern.firstMatch(runtime);
|
||||
final RegExpMatch iOSRuntimeMatch = iOSRuntimePattern.firstMatch(runtime);
|
||||
if (iOSRuntimeMatch != null) {
|
||||
iOSSimRuntime = iOSRuntimeMatch.group(1)!.trim();
|
||||
iOSSimRuntime = iOSRuntimeMatch.group(1).trim();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user