• Martin Kustermann's avatar
    Use `dart compile wasm` for wasm compilations (#143298) · abadf9ff
    Martin Kustermann authored
    * Flags to `dart compile wasm`
    
    Some options are not relevant to a standalone user of `dart compile
    wasm` (e.g. specyfing dart-sdk, platform file etc). => Those aren't
    offered by the `dart compile wasm` tool directly. => We use the
    `--extra-compiler-option=` instead which passes through arbitrary
    options to the dart2wasm compiler. => We don't maintain compatibility of
    those options, if we update them we'll ensure to also update flutter
    tools
    
    * Binaryen optimization passes
    
    This change will mean we use the binaryen flags from Dart SDK which are
    slightly different from the ones in flutter.
    
    * Optimization configuration
    
    This change will also start using the more standardized `-O` flag for
    determining optimization levels. The meaning of those flags have been
    mostly aligned with dart2js (with some differences remaining).
    
    * Minimization
    
    Using the new optimization flags, namely `-O4` for `--wasm-opt=full`,
    will automatically enable the new `--minify` support. Minification is
    Dart semantics preserving but changes the `<obj>.runtimeType.toString()`
    to use minified names (just as in dart2js).
    
    * Code size changes
    
      Overall this change will reduce wonderous code size by around 10%.
    
    Issue https://github.com/dart-lang/sdk/issues/54675
    abadf9ff
Name
Last commit
Last update
.github Loading commit data...
.vscode Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.ci.yaml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENT_GRANT Loading commit data...
README.md Loading commit data...
TESTOWNERS Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...