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
2c56a25d
Unverified
Commit
2c56a25d
authored
May 03, 2023
by
Kevin Moore
Committed by
GitHub
May 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tool] Improve help info with build web --wasm flags (#125907)
Also fixed some comments
parent
0f9d66aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
build_web.dart
packages/flutter_tools/lib/src/commands/build_web.dart
+5
-2
compiler_config.dart
packages/flutter_tools/lib/src/web/compiler_config.dart
+4
-2
No files found.
packages/flutter_tools/lib/src/commands/build_web.dart
View file @
2c56a25d
...
@@ -98,13 +98,16 @@ class BuildWebCommand extends BuildSubCommand {
...
@@ -98,13 +98,16 @@ class BuildWebCommand extends BuildSubCommand {
);
);
argParser
.
addFlag
(
argParser
.
addFlag
(
'omit-type-checks'
,
'omit-type-checks'
,
help:
'Omit type checks in Wasm output.'
,
help:
'Omit type checks in Wasm output.
\n
'
'Reduces code size and improves performance, but may affect runtime correctness. Use with care.'
,
negatable:
false
,
negatable:
false
,
hide:
!
featureFlags
.
isFlutterWebWasmEnabled
,
hide:
!
featureFlags
.
isFlutterWebWasmEnabled
,
);
);
argParser
.
addFlag
(
argParser
.
addFlag
(
'wasm-opt'
,
'wasm-opt'
,
help:
'Run wasm-opt on the output wasm module.'
,
help:
'Optimize output wasm using the Binaryen (https://github.com/WebAssembly/binaryen) tool.
\n
'
'Increases the build time, but will yield a smaller, faster output.'
,
negatable:
false
,
negatable:
false
,
hide:
!
featureFlags
.
isFlutterWebWasmEnabled
,
hide:
!
featureFlags
.
isFlutterWebWasmEnabled
,
);
);
...
...
packages/flutter_tools/lib/src/web/compiler_config.dart
View file @
2c56a25d
...
@@ -147,14 +147,16 @@ class WasmCompilerConfig extends WebCompilerConfig {
...
@@ -147,14 +147,16 @@ class WasmCompilerConfig extends WebCompilerConfig {
runWasmOpt:
defines
[
kRunWasmOpt
]
==
'true'
,
runWasmOpt:
defines
[
kRunWasmOpt
]
==
'true'
,
);
);
/// Build environment for [omitTypeChecks]
;
/// Build environment for [omitTypeChecks]
.
static
const
String
kOmitTypeChecks
=
'WasmOmitTypeChecks'
;
static
const
String
kOmitTypeChecks
=
'WasmOmitTypeChecks'
;
/// Build environment for [runWasmOpt].
static
const
String
kRunWasmOpt
=
'RunWasmOpt'
;
static
const
String
kRunWasmOpt
=
'RunWasmOpt'
;
/// If `omit-type-checks` should be passed to `dart2wasm`.
/// If `omit-type-checks` should be passed to `dart2wasm`.
final
bool
omitTypeChecks
;
final
bool
omitTypeChecks
;
// Run wasm-opt on the resulting module.
//
/
Run wasm-opt on the resulting module.
final
bool
runWasmOpt
;
final
bool
runWasmOpt
;
@override
@override
...
...
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