Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
2ac7d67e
Commit
2ac7d67e
authored
Oct 25, 2016
by
Ryan Macnak
Committed by
GitHub
Oct 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Roll Dart VM. (#6472)
parent
8b197bdd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
34 deletions
+43
-34
build_aot.dart
packages/flutter_tools/lib/src/commands/build_aot.dart
+30
-26
devfs.dart
packages/flutter_tools/lib/src/devfs.dart
+13
-8
No files found.
packages/flutter_tools/lib/src/commands/build_aot.dart
View file @
2ac7d67e
...
...
@@ -270,37 +270,39 @@ Future<String> _buildAotSnapshot(
printStatus
(
'Building app.dylib...'
);
// These names are known to from the engine.
const
String
kDartVmIsolateSnapshotBuffer
=
'kDartVmIsolateSnapshotBuffer
'
;
const
String
kDartIsolateSnapshotBuffer
=
'kDartIsolateSnapshotBuffer
'
;
String
kVmIsolateSnapshot
=
'kVmIsolateSnapshot
'
;
String
kIsolateSnapshot
=
'kIsolateSnapshot
'
;
runCheckedSync
(<
String
>[
'mv'
,
vmIsolateSnapshot
,
path
.
join
(
outputDir
.
path
,
kDartVmIsolateSnapshotBuffer
)]);
runCheckedSync
(<
String
>[
'mv'
,
isolateSnapshot
,
path
.
join
(
outputDir
.
path
,
kDartIsolateSnapshotBuffer
)]);
String
kVmIsolateSnapshotC
=
path
.
join
(
outputDir
.
path
,
'
$kVmIsolateSnapshot
.c'
);
String
kIsolateSnapshotC
=
path
.
join
(
outputDir
.
path
,
'
$kIsolateSnapshot
.c'
);
String
assemblyO
=
path
.
join
(
outputDir
.
path
,
'snapshot_assembly.o'
);
String
kVmIsolateSnapshotO
=
path
.
join
(
outputDir
.
path
,
'
$kVmIsolateSnapshot
.o'
);
String
kIsolateSnapshotO
=
path
.
join
(
outputDir
.
path
,
'
$kIsolateSnapshot
.o'
);
String
kDartVmIsolateSnapshotBufferC
=
path
.
join
(
outputDir
.
path
,
'
$kDartVmIsolateSnapshotBuffer
.c'
);
String
kDartIsolateSnapshotBufferC
=
path
.
join
(
outputDir
.
path
,
'
$kDartIsolateSnapshotBuffer
.c'
);
List
<
String
>
commonBuildOptions
=
<
String
>[
'-arch'
,
'arm64'
,
'-miphoneos-version-min=8.0'
];
runCheckedSync
(<
String
>[
'xxd'
,
'--include'
,
kDartVmIsolateSnapshotBuffer
,
path
.
basename
(
kDartVmIsolateSnapshotBufferC
)
],
workingDirectory:
outputDir
.
path
);
runCheckedSync
(<
String
>[
'xxd'
,
'--include'
,
kDartIsolateSnapshotBuffer
,
path
.
basename
(
kDartIsolateSnapshotBufferC
)
],
workingDirectory:
outputDir
.
path
);
if
(
interpreter
)
{
runCheckedSync
(<
String
>[
'mv'
,
vmIsolateSnapshot
,
path
.
join
(
outputDir
.
path
,
kVmIsolateSnapshot
)]);
runCheckedSync
(<
String
>[
'mv'
,
isolateSnapshot
,
path
.
join
(
outputDir
.
path
,
kIsolateSnapshot
)]);
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'
);
runCheckedSync
(<
String
>[
'xxd'
,
'--include'
,
kVmIsolateSnapshot
,
path
.
basename
(
kVmIsolateSnapshotC
)
],
workingDirectory:
outputDir
.
path
);
runCheckedSync
(<
String
>[
'xxd'
,
'--include'
,
kIsolateSnapshot
,
path
.
basename
(
kIsolateSnapshotC
)
],
workingDirectory:
outputDir
.
path
);
List
<
String
>
commonBuildOptions
=
<
String
>[
'-arch'
,
'arm64'
,
'-miphoneos-version-min=8.0'
];
if
(!
interpreter
)
runCheckedSync
(<
String
>[
'xcrun'
,
'cc'
]
..
addAll
(
commonBuildOptions
)
..
addAll
(<
String
>[
'-c'
,
kVmIsolateSnapshotC
,
'-o'
,
kVmIsolateSnapshotO
]));
runCheckedSync
(<
String
>[
'xcrun'
,
'cc'
]
..
addAll
(
commonBuildOptions
)
..
addAll
(<
String
>[
'-c'
,
kIsolateSnapshotC
,
'-o'
,
kIsolateSnapshotO
]));
}
else
{
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'
);
...
...
@@ -312,11 +314,13 @@ Future<String> _buildAotSnapshot(
'-Xlinker'
,
'-rpath'
,
'-Xlinker'
,
'@loader_path/Frameworks'
,
'-install_name'
,
'@rpath/app.dylib'
,
'-o'
,
appSo
,
kDartVmIsolateSnapshotBufferO
,
kDartIsolateSnapshotBufferO
,
]);
if
(!
interpreter
)
if
(
interpreter
)
{
linkCommand
.
add
(
kVmIsolateSnapshotO
);
linkCommand
.
add
(
kIsolateSnapshotO
);
}
else
{
linkCommand
.
add
(
assemblyO
);
}
runCheckedSync
(
linkCommand
);
}
...
...
packages/flutter_tools/lib/src/devfs.dart
View file @
2ac7d67e
...
...
@@ -222,14 +222,19 @@ class _DevFSHttpWriter {
Future
<
Null
>
_scheduleWrite
(
DevFSEntry
entry
,
DevFSProgressReporter
progressReporter
)
async
{
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
();
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
'
);
}
if
(
progressReporter
!=
null
)
{
_done
++;
progressReporter
(
_done
,
_max
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment