mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[tool] Improve help info with build web --wasm flags (#125907)
Also fixed some comments
This commit is contained in:
parent
0f9d66aad6
commit
2c56a25da3
@ -98,13 +98,16 @@ class BuildWebCommand extends BuildSubCommand {
|
||||
);
|
||||
argParser.addFlag(
|
||||
'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,
|
||||
hide: !featureFlags.isFlutterWebWasmEnabled,
|
||||
);
|
||||
argParser.addFlag(
|
||||
'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,
|
||||
hide: !featureFlags.isFlutterWebWasmEnabled,
|
||||
);
|
||||
|
@ -147,14 +147,16 @@ class WasmCompilerConfig extends WebCompilerConfig {
|
||||
runWasmOpt: defines[kRunWasmOpt] == 'true',
|
||||
);
|
||||
|
||||
/// Build environment for [omitTypeChecks];
|
||||
/// Build environment for [omitTypeChecks].
|
||||
static const String kOmitTypeChecks = 'WasmOmitTypeChecks';
|
||||
|
||||
/// Build environment for [runWasmOpt].
|
||||
static const String kRunWasmOpt = 'RunWasmOpt';
|
||||
|
||||
/// If `omit-type-checks` should be passed to `dart2wasm`.
|
||||
final bool omitTypeChecks;
|
||||
|
||||
// Run wasm-opt on the resulting module.
|
||||
/// Run wasm-opt on the resulting module.
|
||||
final bool runWasmOpt;
|
||||
|
||||
@override
|
||||
|
Loading…
Reference in New Issue
Block a user