Closed
Description
AOT compilation was possible on Dart 1.24 through CLI with using appropriated app-aot
value for --snapshot-kind
, but I've recently tried to compile *.dart source code on Dart 2.0 like this:
$ dart --snapshot-kind=app-aot --snapshot=app.snapshot example/http_handler.dart
and it returned error with following context:
../../runtime/bin/main.cc: 251: error: Dart 2.0 AOT compilations only accept Kernel IR files as input ('example/http_handler.dart' is not a valid Kernel IR file).
Dumping native stack trace for thread 1428
[0x0000560cff5767df] dart::Profiler::DumpStackTrace(void*)
[0x0000560cff5767df] dart::Profiler::DumpStackTrace(void*)
[0x0000560cff7b2302] dart::Assert::Fail(char const*, ...)
[0x0000560cff1f3083] dart::bin::RunMainIsolate(char const*, dart::bin::CommandLineOptions*)
[0x0000560cff1f3ae7] dart::bin::main(int, char**)
[0x0000560cff1f43c9] Unknown symbol
-- End of DumpStackTrace
Aborted (core dumped)
Can you, please, provide a detailed guide how to AOT compile source as it seems Dart 2.0 isn't able to compile *.dart
using CLI.