Commit 379b1030 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Rollback commits to get iOS into a stable state (#6464)

* Rollback commits to get iOS into a stable state

This rolls back the following commits:
* 23c52fc7 (#6434)
* a97cf4b5 (#6433)
* e72e1744 (#6428)

It also updates the engine to a newer revision that has the
necessary rollbacks in the engine repo.

Fixes #6458
parent f3ca1104
0aea498f611dff00c121e06d55044f7d2d3a599a
db12c5e6218389057809e1a75ee13f030d41d41c
......@@ -269,13 +269,38 @@ Future<String> _buildAotSnapshot(
if (platform == TargetPlatform.ios) {
printStatus('Building app.dylib...');
// These names are known to from the engine.
const String kDartVmIsolateSnapshotBuffer = 'kDartVmIsolateSnapshotBuffer';
const String kDartIsolateSnapshotBuffer = 'kDartIsolateSnapshotBuffer';
runCheckedSync(<String>['mv', vmIsolateSnapshot, path.join(outputDir.path, kDartVmIsolateSnapshotBuffer)]);
runCheckedSync(<String>['mv', isolateSnapshot, path.join(outputDir.path, kDartIsolateSnapshotBuffer)]);
String kDartVmIsolateSnapshotBufferC = path.join(outputDir.path, '$kDartVmIsolateSnapshotBuffer.c');
String kDartIsolateSnapshotBufferC = path.join(outputDir.path, '$kDartIsolateSnapshotBuffer.c');
runCheckedSync(<String>[
'xxd', '--include', kDartVmIsolateSnapshotBuffer, path.basename(kDartVmIsolateSnapshotBufferC)
], workingDirectory: outputDir.path);
runCheckedSync(<String>[
'xxd', '--include', kDartIsolateSnapshotBuffer, path.basename(kDartIsolateSnapshotBufferC)
], workingDirectory: outputDir.path);
String assemblyO = path.join(outputDir.path, 'snapshot_assembly.o');
String kDartVmIsolateSnapshotBufferO = path.join(outputDir.path, '$kDartVmIsolateSnapshotBuffer.o');
String kDartIsolateSnapshotBufferO = path.join(outputDir.path, '$kDartIsolateSnapshotBuffer.o');
List<String> commonBuildOptions = <String>['-arch', 'arm64', '-miphoneos-version-min=8.0'];
if (!interpreter)
runCheckedSync(<String>['xcrun', 'cc']
..addAll(commonBuildOptions)
..addAll(<String>['-c', assembly, '-o', assemblyO]));
runCheckedSync(<String>['xcrun', 'cc']
..addAll(commonBuildOptions)
..addAll(<String>['-c', kDartVmIsolateSnapshotBufferC, '-o', kDartVmIsolateSnapshotBufferO]));
runCheckedSync(<String>['xcrun', 'cc']
..addAll(commonBuildOptions)
..addAll(<String>['-c', kDartIsolateSnapshotBufferC, '-o', kDartIsolateSnapshotBufferO]));
String appSo = path.join(outputDir.path, 'app.dylib');
......@@ -287,6 +312,8 @@ Future<String> _buildAotSnapshot(
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-install_name', '@rpath/app.dylib',
'-o', appSo,
kDartVmIsolateSnapshotBufferO,
kDartIsolateSnapshotBufferO,
]);
if (!interpreter)
linkCommand.add(assemblyO);
......
......@@ -222,19 +222,14 @@ class _DevFSHttpWriter {
Future<Null> _scheduleWrite(DevFSEntry entry,
DevFSProgressReporter progressReporter) async {
try {
HttpClientRequest request = await _client.putUrl(httpAddress);
request.headers.removeAll(HttpHeaders.ACCEPT_ENCODING);
request.headers.add('dev_fs_name', fsName);
request.headers.add('dev_fs_path_b64',
BASE64.encode(UTF8.encode(entry.devicePath)));
Stream<List<int>> contents = entry.contentsAsCompressedStream();
await request.addStream(contents);
HttpClientResponse response = await request.close();
await response.drain();
} catch (e, stackTrace) {
printError('Error writing "${entry.devicePath}" to DevFS: $e\n$stackTrace');
}
HttpClientRequest request = await _client.putUrl(httpAddress);
request.headers.removeAll(HttpHeaders.ACCEPT_ENCODING);
request.headers.add('dev_fs_name', fsName);
request.headers.add('dev_fs_path', entry.devicePath);
Stream<List<int>> contents = entry.contentsAsCompressedStream();
await request.addStream(contents);
HttpClientResponse response = await request.close();
await response.drain();
if (progressReporter != null) {
_done++;
progressReporter(_done, _max);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment