Skip to content

Breaking change request: discontinue bin/dart2aot #38834

@mit-mit

Description

@mit-mit

Summary

bin/dart2aot is a new AOT compiler that was added in Dart 2.5. It was implemented as a shell script, and many usability issues have been reported. To resolve these, and to incorporate new functionality for compiling self-contained executables, we have added a new AOT compiler tool, bin/dart2native. As dart2native supports everything that dart2aot does, we would like to remove dart2aot.

Mitigation

It's simple to migrate from using dart2aot to using dart2native:

dart2aot took two arguments, , and supported creating AOT snapshots only.
dart2aot <dart-source-file> <dart-aot-file>

dart2native supports this, but with a slightly different syntax:
dart2native <dart-source-file> --output-kind=aot --output=<dart-aot-file>

Thus dart2aot hello.dart hello.dart.aot should change to
dart2native hello.dart --output-kind=aot --output=hello.dart.aot

Timing

dart2native is available in Dart 2.6.0 dev-channel builds starting with 2.6.0-dev.6.0. Dev-channel builds are available from https://dart.dev/tools/sdk/archive

We intend to remove dart2aot from Dart 2.6.0 dev-channel builds one week from now, and thus Dart 2.6.0 stable would ship with dart2native only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).breaking-change-requestThis tracks requests for feedback on breaking changes

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions