mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 01:14:16 +00:00
a4dd314c9e
When iterating on core library changes or changes in the AOT compiler
many seconds are wasted waiting on gen_kernel/compile_platform to
parse Dart code. This happens because we are running these tools
from sources on prebuilt Dart SDK.
This CL allows SDK developer to opt-in into AOT compiling these
tools by adding `precompile_tools=true` to their DART_GN_ARGS.
AOT compilation is performed using prebuilt SDK - so these
executables do not need to be recompiled if core libraries or
VM changes reducing iteration cycles.
pkg/vm/tool/precompiler2 is tweaked to detect when DART_GN_ARGS
contains `precompile_tools=true` and use precompiled
gen_kernel.exe instead of running it from source.
Using precompiled compile_platform takes vm_platform_strong.dill
build from 20 seconds to 3 seconds.
Using precompiled gen_kernel takes small benchmark build from
~10 seconds to 2 seconds.
This relands
|
||
---|---|---|
.. | ||
config | ||
dart | ||
fuchsia | ||
linux | ||
mac | ||
rbe | ||
rust | ||
sanitizers | ||
secondary | ||
toolchain | ||
.gitignore | ||
detect_host_arch.py | ||
executable_suffix.gni | ||
find_depot_tools.py | ||
gn_dart_compile_exe.py | ||
gn_helpers.py | ||
gn_run_binary.py | ||
OWNERS | ||
README.dart.md | ||
shim_headers.gni | ||
vs_toolchain.py |
This directory was taken from a snapshot of flutter/engine/src/build/.
The snapshot was taken with a recursive copy cp -R
of the directory from
the flutter repository.
The contents has now diverged significantly from Flutter, and is maintained independently by the Dart team. It is used to support the GN build system.