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
b1aff285
Unverified
Commit
b1aff285
authored
Oct 29, 2019
by
Jonah Williams
Committed by
GitHub
Oct 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass --no-gen-bytecode to aot kernel compiler invocations (#43753)
parent
7e60a65f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
compile.dart
packages/flutter_tools/lib/src/compile.dart
+2
-0
compile_batch_test.dart
.../flutter_tools/test/general.shard/compile_batch_test.dart
+24
-0
No files found.
packages/flutter_tools/lib/src/compile.dart
View file @
b1aff285
...
...
@@ -324,6 +324,8 @@ class KernelCompiler {
if
(
aot
)
...<
String
>[
'--aot'
,
'--tfa'
,
// TODO(jonahwilliams): remove when https://github.com/flutter/flutter/issues/43751 is resolved.
'--no-gen-bytecode'
,
],
if
(
packagesPath
!=
null
)
...<
String
>[
'--packages'
,
...
...
packages/flutter_tools/test/general.shard/compile_batch_test.dart
View file @
b1aff285
...
...
@@ -66,6 +66,30 @@ void main() {
Platform:
kNoColorTerminalPlatform
,
});
testUsingContext
(
'passes no-gen-bytecode to kernel compiler in aot/release mode'
,
()
async
{
when
(
mockFrontendServer
.
stdout
)
.
thenAnswer
((
Invocation
invocation
)
=>
Stream
<
List
<
int
>>.
fromFuture
(
Future
<
List
<
int
>>.
value
(
utf8
.
encode
(
'result abc
\n
line1
\n
line2
\n
abc
\n
abc /path/to/main.dart.dill 0'
))
));
final
KernelCompiler
kernelCompiler
=
await
kernelCompilerFactory
.
create
(
null
);
await
kernelCompiler
.
compile
(
sdkRoot:
'/path/to/sdkroot'
,
mainPath:
'/path/to/main.dart'
,
buildMode:
BuildMode
.
release
,
trackWidgetCreation:
false
,
aot:
true
,
);
expect
(
mockFrontendServerStdIn
.
getAndClear
(),
isEmpty
);
final
VerificationResult
argVerification
=
verify
(
mockProcessManager
.
start
(
captureAny
));
expect
(
argVerification
.
captured
.
single
,
contains
(
'--no-gen-bytecode'
));
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
OutputPreferences:
()
=>
OutputPreferences
(
showColor:
false
),
Platform:
kNoColorTerminalPlatform
,
});
testUsingContext
(
'batch compile single dart failed compilation'
,
()
async
{
final
BufferLogger
bufferLogger
=
logger
;
when
(
mockFrontendServer
.
stdout
)
...
...
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