dart-sdk/build
Vyacheslav Egorov a4dd314c9e [tools] Allow precompiling gen_kernel and compile_platform
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 5cda2a871c with fixes
for Flutter build.

TEST=manually tested

Change-Id: I552861c80c152890655e41baaf6ea3fb3b03a57e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367961
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-05-24 09:40:39 +00:00
..
config [build] Fix ARM32 GCC build. 2024-05-22 18:06:01 +00:00
dart Revert "[tools] Allow precompiling gen_kernel and compile_platform" 2024-05-23 13:52:58 +00:00
fuchsia Reland "[Fuchsia] Remove the legacy gn build rules for fuchsia" 2024-03-14 20:22:12 +00:00
linux [infra] Update alpine sysroot 2024-03-21 10:43:15 +00:00
mac Spelling build 2023-01-23 08:56:14 +00:00
rbe Reland "[infra] RBE all the things." 2024-04-12 22:06:32 +00:00
rust [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
sanitizers Spelling build 2023-01-23 08:56:14 +00:00
secondary [build] Build the standard c++ library from source. 2023-05-22 23:38:58 +00:00
toolchain Reland "[infra] RBE all the things." 2024-04-12 22:06:32 +00:00
.gitignore [infra] Update alpine sysroot 2024-03-21 10:43:15 +00:00
detect_host_arch.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
executable_suffix.gni Fix builds targeting Android from a Windows host gen_snapshot. 2019-06-07 00:49:33 +00:00
find_depot_tools.py [build] Update Windows SDK to 10.0.22621.0. 2024-02-08 16:06:50 +00:00
gn_dart_compile_exe.py [tools] Allow precompiling gen_kernel and compile_platform 2024-05-24 09:40:39 +00:00
gn_helpers.py Fix gn helper script to create *valid* strings for settings containing backslashes. 2021-05-19 12:35:16 +00:00
gn_run_binary.py [build] Make app snapshot build failures copy/pastable. 2021-10-14 11:51:32 +00:00
OWNERS [infra] Give VM engineers OWNERS over tools/gn.py et al. 2022-04-25 17:47:23 +00:00
README.dart.md fix(docs): corrects common typos in project documentation 2021-05-18 15:48:18 +00:00
shim_headers.gni add tools for generating shim headers 2023-04-19 01:37:48 +00:00
vs_toolchain.py [infra] Support testing with RBE on Windows. 2024-02-29 10:33:09 +00:00

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.