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
851c9521
Unverified
Commit
851c9521
authored
May 18, 2022
by
Jonah Williams
Committed by
GitHub
May 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] pass --compact-async to frontend_server (#104026)
parent
4b1ff134
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
compile.dart
packages/flutter_tools/lib/src/compile.dart
+8
-0
compile_batch_test.dart
.../flutter_tools/test/general.shard/compile_batch_test.dart
+2
-0
compile_test.dart
packages/flutter_tools/test/general.shard/compile_test.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/compile.dart
View file @
851c9521
...
...
@@ -19,6 +19,12 @@ import 'base/platform.dart';
import
'build_info.dart'
;
import
'convert.dart'
;
/// Opt-in changes to the dart compilers.
const
List
<
String
>
kDartCompilerExperiments
=
<
String
>[
// improve AOT code size.
'--compact-async'
,
];
/// The target model describes the set of core libraries that are available within
/// the SDK.
class
TargetModel
{
...
...
@@ -183,11 +189,13 @@ List<String> buildModeOptions(BuildMode mode, List<String> dartDefines) {
'-Ddart.vm.profile=true'
,
if
(!
dartDefines
.
any
((
String
define
)
=>
define
.
startsWith
(
'dart.vm.product'
)))
'-Ddart.vm.product=false'
,
...
kDartCompilerExperiments
,
];
case
BuildMode
.
release
:
return
<
String
>[
'-Ddart.vm.profile=false'
,
'-Ddart.vm.product=true'
,
...
kDartCompilerExperiments
,
];
}
throw
Exception
(
'Unknown BuildMode:
$mode
'
);
...
...
packages/flutter_tools/test/general.shard/compile_batch_test.dart
View file @
851c9521
...
...
@@ -197,6 +197,7 @@ void main() {
'--no-print-incremental-dependencies'
,
'-Ddart.vm.profile=true'
,
'-Ddart.vm.product=false'
,
'--compact-async'
,
'--no-link-platform'
,
'--aot'
,
'--tfa'
,
...
...
@@ -244,6 +245,7 @@ void main() {
'--no-print-incremental-dependencies'
,
'-Ddart.vm.profile=false'
,
'-Ddart.vm.product=true'
,
'--compact-async'
,
'--no-link-platform'
,
'--aot'
,
'--tfa'
,
...
...
packages/flutter_tools/test/general.shard/compile_test.dart
View file @
851c9521
...
...
@@ -105,11 +105,13 @@ void main() {
testWithoutContext
(
'buildModeOptions removes matching profile define in profile mode'
,
()
{
expect
(
buildModeOptions
(
BuildMode
.
profile
,
<
String
>[
'dart.vm.profile=true'
]),
<
String
>[
'-Ddart.vm.product=false'
,
'--compact-async'
]);
});
testWithoutContext
(
'buildModeOptions removes both matching profile and release define in profile mode'
,
()
{
expect
(
buildModeOptions
(
BuildMode
.
profile
,
<
String
>[
'dart.vm.profile=false'
,
'dart.vm.product=true'
]),
<
String
>[
'--compact-async'
]);
});
}
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