Commit Graph

381 Commits

Author SHA1 Message Date
asiva 97bc401163 Revert "[VM/dartdev] Switch dartdev to use an AOT runtime."
This reverts commit 5399dbf6f6.

Reason for revert : Flutter rolls are failing

TEST=ci

Change-Id: I76fede849705514496adbc2ab7f6c262de4103ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439661
Reviewed-by: Jason Simmons <jsimmons@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-09 23:08:28 -07:00
asiva 5399dbf6f6 [VM/dartdev] Switch dartdev to use an AOT runtime.
- split the Dart CLI tool out of the VM into it's own embedder which
  runs in AOT mode. The pure Dart VM executable is called 'dartvm' and
  has no Dart CLI functionality in it
- the Dart CLI executable parses the CLI commands and invokes the rest
  of the AOT tools in the same process, for the 'run' and 'test'
  commands it execs a process which runs 'dartvm' to run
- 'dart hello.dart' execs the 'dartvm' process and runs 'hello.dart'
- the Dart CLI is not generated for ia32 as we are not shipping a
  Dart SDK for ia32 anymore (support to execute the 'dartvm' for ia32
  architecture is retained)
- the Dart CLI tool is not built in the internal Dart SDK builds

TEST=ci

Some performance improvement numbers
'dart format pkg/dartdev' goes from 1.17 secs to 0.22 secs
'dart doc pkg/dartdev' goes from 100.2 secs to 66.6 secs
'dart fix pkg/dartdev' goes from 19.3 secs to 14.5 secs

Change-Id: I66984a26cb2ab014b34dc1873f1f3d2884e13518
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364202
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-07-04 13:22:13 -07:00
Nicholas Shahan 51fee27069 [ddc] Update DDC snapshot training target
Specify package_config.json when running DDC JIT snapshot training.
This allows the build to succeed in environments where the running
compiler would go searching for the package_config.json and find
one in some parent directory. This should fix local web engine
builds in Flutter which likely broke when the repo was migrated to a
pub workspace.

Change-Id: Ifb5b6357cbf40f04069020ab1b4aee099d0945ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438602
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-07-02 16:29:44 -07:00
Vyacheslav Egorov 077e1be29c [gn] Fix precompile_tools=True (attempt 2)
Turns out that dart compile exe --depfile produces
depfile which does not work with ninja because
it uses absolute path to the output file
instead of using relative path.

So we can't use it directly and need to fix
depfile.

TEST=manually

Change-Id: I1aadfd5079cc38d392933f9afe333f63407bb295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435680
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-06-23 14:54:04 -07:00
Vyacheslav Egorov b0f933facc [gn] Fix precompile_tools=true
gn_dart_compile_exe.py wrapper stopped working because we rearranged
something in the prebuilt SDK. However we no longer need it because
we can ask `compile exe` itself to produce the depfile.

TEST=manually
R=kustermann@google.com

Change-Id: If5e64ede08b4e146a7bf033e7ef2d1809f40de1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435500
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-06-18 07:18:22 -07:00
Ryan Macnak ab4f9351b1 Rename vm_platform_strong.dill to vm_platform.dill.
The name has always been annoying because it did not add strong typing. And now there aren't variants of the VM platform to distinguish.

Leave a copy at the old name to not immediately break illegal uses.

TEST=ci
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,flutter-frontend-try,flutter-linux-try
Change-Id: Ie76fa7f16940aa1ba8d582eb5197f0ae55dc8938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429828
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-16 18:33:38 -07:00
Ryan Macnak 5f877fb7c8 Revert "[build] Update to Focal sysroot."
This reverts commit ad9a13a1c1.

Reason for revert: breaks Debian arm32 package

Original change's description:
> [build] Update to Focal sysroot.
>
> Our minimum supported version is Jammy, which Fuchsia doesn't have a CIPD package for, but at least we no longer need to use a different sysroot for different architectures.
>
> Change-Id: I90f37797c2f2f79886df85d6b7ed9903270e8c2a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433561
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I532c6052ba9bfe271f34bc18f6120eb80df98d6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433922
Auto-Submit: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-06-10 16:11:47 -07:00
Ryan Macnak ad9a13a1c1 [build] Update to Focal sysroot.
Our minimum supported version is Jammy, which Fuchsia doesn't have a CIPD package for, but at least we no longer need to use a different sysroot for different architectures.

Change-Id: I90f37797c2f2f79886df85d6b7ed9903270e8c2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433561
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-10 14:31:51 -07:00
なつき e8f47127fa [infra] Remove ia32 from alpine sysroot script
Closes https://github.com/dart-lang/sdk/pull/60764

GitOrigin-RevId: 7077a42d948bd0c55ce0e6c7de6fe992e29c4ed2
Change-Id: Ib9573f3d017750a77e1faa28cd38f35851738f37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429820
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-05-20 14:39:28 -07:00
Ryan Macnak 1d53d28e96 [infra] Setup for x64 reclient on Linux ARM64.
Change-Id: I2ff065c8b962d768f93ea3304544ceb527f9c266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429466
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-20 13:43:11 -07:00
Ryan Macnak f4fa8b7ca6 [infra] Use x64 reclient on Windows ARM64.
Switch build to use Clang. This somewhat degrades FFI testing, but reduces build time by roughly half or one hour.

Cq-Include-Trybots: luci.dart.try:pkg-win-release-arm64-try,vm-aot-win-debug-arm64-try,vm-aot-win-release-arm64-try,vm-win-debug-arm64-try,vm-win-release-arm64-try
Change-Id: Ie267942e99934312b228cfadcd6d5b8477f855c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-19 17:31:29 -07:00
Ryan Macnak f8915309d9 [build] Build libcxx ourselves for Mac ASAN too.
Bug: https://github.com/dart-lang/sdk/issues/60720
Change-Id: I5158610702dd2d3da7146187dc895f8303eb92be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428400
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2025-05-13 23:43:02 -07:00
Ryan Macnak aa0a29c966 [infra] More setup for Mac and Windows ASAN.
Change-Id: I7cec0e5823410ee9dea2074c32f2ccb6f0aabceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427960
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-05-12 10:31:34 -07:00
Ivan Inozemtsev 29e33b00d0 Reland "watchOS target os"
This is a reland of commit 7ae1d75869

TEST=manual, no watchOS SDK on bots yet.

Original change's description:
> watchOS target os
>
> - add support for --os=watchos | --os=watchos_simulator
> - do not depend on perfetto if dart_support_perfetto is false
> - change the default value for dart_support_perfetto to !is_watchos
>
> To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
>
> TEST=manual, no watchOS SDK on bots yet.
>
> Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
> Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Change-Id: I2b50f7eb4da173627aeb4833b88a08712b278d9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425523
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-05-05 06:40:30 -07:00
asiva edd241dc36 Invoke dart2js directly using dartaotruntime while building
observatory instead of using 'compile js'

TEST=ci

Change-Id: Id190a764d1d7e9ee4b29b02549cf94b750c6dbe3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425420
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-04-29 17:03:43 -07:00
Ivan Inozemtsev 10c579c7e8 Revert "watchOS target os"
This reverts commit 7ae1d75869.

Reason for revert: breaks flutter build

Original change's description:
> watchOS target os
>
> - add support for --os=watchos | --os=watchos_simulator
> - do not depend on perfetto if dart_support_perfetto is false
> - change the default value for dart_support_perfetto to !is_watchos
>
> To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
>
> TEST=manual, no watchOS SDK on bots yet.
>
> Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
> Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I4bede9ede04ac3c533b8ff7ae2f1adbd84eb2397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425262
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-29 03:21:37 -07:00
Ivan Inozemtsev 7ae1d75869 watchOS target os
- add support for --os=watchos | --os=watchos_simulator
- do not depend on perfetto if dart_support_perfetto is false
- change the default value for dart_support_perfetto to !is_watchos

To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.

TEST=manual, no watchOS SDK on bots yet.

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-29 02:28:52 -07:00
Ryan Macnak b69b2c8b4f [build] Include a deterministic build id.
Change-Id: If37a5ec31e90175d38edd0f531a7f928596e7281
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423900
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-04-23 09:45:39 -07:00
Ryan Macnak 326e32a167 [build] Limit the number of concurrent dart/gen_snapshot actions.
Ninja may be run with a large --jobs value to run more C/C++ compilation actions in parallel on remote workers. The dart and gen_snapshot actions during the build should in this case remain limited to the number of cores on the machine to avoid a coincident memory usage that is too high.

When running in the Dart tree with RBE, limit this by changing the RBE exec_strategy away from racing. Otherwise, use a pool to limit the concurrency of this action type.

TEST=build.py --no-rbe -j1000
Bug: https://github.com/flutter/flutter/issues/164591
Change-Id: Ia5e5615d0067b34d49871f26ead074cb891baf70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423562
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-04-22 11:34:41 -07:00
zijiehe-google-com 65cdd580c7 [fuchsia] Uprev test-scripts with FUCHSIA_READELF env
Copied from http://go/dart-reviews/421761 with the essential fix to
make it work.

1) Add the env to select the right readelf.
2) Remove the removal of arch/, it's referred by meta.json.

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try,vm-fuchsia-release-arm64-try
Bug: b/407890258, b/338009514
Change-Id: Ib7ae646e57082d310d3d76ca16834faefb888201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421881
Auto-Submit: Zijie He <zijiehe@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-04-14 11:07:11 -07:00
Vyacheslav Egorov 5f32e78a09 [vm] Fix running under HWASAN
HWASAN tags stack regions (and stack pointers) with 0,
but also selectively tags some stack allocations with
non-zero tags. These tags need to be cleared when
allocation goes out of scope so that stack can be
later safely reused - otherwise stale tags confuse
HWASAN instrumentation later.

This CL teaches Exceptions::JumpToFrame to do that.

CL also adds basic build changes to support building
with HWASAN, though I don't wire it into CI for now
as it can only really run on Android ARM64

TEST=manually on Android phone and on internal tests

Bug: b/374433249
Change-Id: I678443dc1de693c999a226bee0d71a6f3582d4f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421180
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>
2025-04-14 10:14:54 -07:00
Ivan Inozemtsev 8773b6618f Reland "Update libcxx and libcxxabi"
This is a reland of commit 3491f72880

Original change's description:
> Update libcxx and libcxxabi
>
> Add libc, required by libcxx.
>
> Based on https://github.com/flutter/flutter/pull/165621.
>
> Change-Id: I5b929dc81b2572e3b919a8d20e031f98196375e6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416220
> Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>

Change-Id: I9392f4cdc2ccb985085768c90bd293d353bf4c95
Cq-Include-Trybots: luci.dart.try:vm-aot-tsan-linux-release-x64-try,vm-tsan-linux-release-arm64-try,vm-msan-linux-release-x64-try,vm-ubsan-linux-release-arm64-try,vm-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421300
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-09 09:04:51 -07:00
Ivan Inozemtsev 53f9327c75 Revert "Update libcxx and libcxxabi"
This reverts commit 3491f72880.

Reason for revert: breaks tsan on linux. I did test locally before submitting, but without RBE.

Original change's description:
> Update libcxx and libcxxabi
>
> Add libc, required by libcxx.
>
> Based on https://github.com/flutter/flutter/pull/165621.
>
> Change-Id: I5b929dc81b2572e3b919a8d20e031f98196375e6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416220
> Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Idcae5b01dbec26045ea7704d1575f73947d0682e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420560
Commit-Queue: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-04-04 16:47:58 -07:00
Alexander Aprelev e5e9f29115 [build/win] Update vs_toolchain.py with latest chromium.
This syncs up with chromium https://chromium.googlesource.com/chromium/src/build/+/d0ce4a42b5c1c9b6b437fe1e19d94a6a4dbdeedc/vs_toolchain.py

TEST=ci

Change-Id: I42e69c4a82fbf5f8b7a43b13e26dc4de29ec85fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419928
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-04-04 08:58:22 -07:00
Ivan Inozemtsev 3491f72880 Update libcxx and libcxxabi
Add libc, required by libcxx.

Based on https://github.com/flutter/flutter/pull/165621.

Change-Id: I5b929dc81b2572e3b919a8d20e031f98196375e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416220
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-04 07:32:20 -07:00
Ivan Inozemtsev 3718ed6426 Pass --no-junction flag to depot_tools script for windows toolchain
This cancels the effect of https://source.chromium.org/chromium/chromium/tools/depot_tools/+/c6684fda9877962580c021aab7c8bc0e9f1c2647.

Change-Id: If8a46bbcc1d1d8b645609d3a9d6f174e3d420edd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419841
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-02 06:33:49 -07:00
Lasse R.H. Nielsen 8d46b7cd81 Remove references to .packages from build scripts.
It's just names and comments, they already used
`package_config.json` as the package configuration.

Change-Id: Icd421ed99079fa9058426e1536565658938252ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414100
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-03-11 03:37:14 -07:00
Martin Kustermann 3b750c5545 [dart2wasm] Generate *.support.js feature detection files
The file will contain a JS expression that evaluates to a boolean.
If it (at runtime) evalutes to

  * `true` it means that all required features are supported by the JS
    environment and the dart2wasm-compiled app can be used

  * `false` it means some features were not present in the JS
    environment and the dart2wasm-compiled app shouldn't be used,
    instead a dart2js fallback may be used

We introduce this mechanism to allow users, at compilation time, to tell
dart2wasm to take advantage of new spec features and allow the runtime
to self-detect whether they are available and fallback to dart2js if
not.

The first feature we introduce (already in this PR) is
`--require-js-string-builtin` that will tell dart2wasm it can assume the
`js-string` builtin is available (and emit corresponding `*.support.js`
code to detect it).

If the flag was passed, we take advantage of the `js-string` import
mechanism for string constants that doesn't require emitting them in the
mjs file (which significantly reduces code size and improves startup
time - compared with emitting JS strings in the mjs file).

We enable `--require-js-string-builtin` on one CI configuration for
testing that if we don't use any polyfill, the imports of the builtin
functions as well as magical utf8-encoded wasm imports work.

We also use a template mechanism to generate `*.mjs` as the code
becomes more readable (e.g. to conditionally include the js string
polyfill)

Issue https://github.com/dart-lang/sdk/issues/59951

Change-Id: Ic7e7818a2d5269095935022941352beeb9fed731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408781
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-02-10 06:17:49 -08:00
Ivan Inozemtsev 6e33c95463 Dart Engine
Adds shared libraries for embedding Dart VM and new API (runtime/engine/include/dart_engine.h).

TEST=tests/standalone/embedder_samples_test.dart

Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-asan-linux-release-x64-try,vm-aot-dwarf-linux-product-x64-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv32-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-aot-ubsan-linux-release-x64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-aot-win-product-x64-try,vm-aot-win-release-x64-try,vm-appjit-linux-debug-x64-try,vm-appjit-linux-product-x64-try,vm-appjit-linux-release-x64-try,vm-asan-linux-release-arm64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-product-arm-try,vm-ffi-android-product-arm64c-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try,vm-gcc-linux-try,vm-linux-debug-ia32-try,vm-linux-debug-simriscv32-try,vm-linux-debug-simriscv64-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-release-arm64-try,vm-linux-release-ia32-try,vm-linux-release-simarm-try,vm-linux-release-x64-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-msan-linux-release-arm64-try,vm-msan-linux-release-x64-try,vm-msvc-windows-try,vm-reload-linux-debug-x64-try,vm-reload-linux-release-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-reload-rollback-linux-release-x64-try,vm-tsan-linux-release-arm64-try,vm-tsan-linux-release-x64-try,vm-ubsan-linux-release-arm64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try,vm-win-release-x64-try
Change-Id: Ia4e4d1b871ddef515cfb2f4639bdaa9fe3676936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402860
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-01-28 03:53:40 -08:00
Ryan Macnak ebfcd436da [build] Update RBE implicit inputs for new checked-in SDK.
Change-Id: I1c6b64b63dca75d49a0c6af78f49d778ffbcc419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400060
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-12-10 23:05:47 +00:00
Ryan Macnak 04dc8ccc5c [build] Expand when compiled_action / prebuilt_tool_action can run on RBE.
Change-Id: I37b0fb9ef35339b3b387879245c93f2f5d693d83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398952
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-12-09 19:34:03 +00:00
Ryan Macnak 31c2de75e7 [build] Setup RBE for the Fuchsia toolchain.
Change-Id: I4d4860cfb0ac28fb30d44681659505d5dd73f9ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398943
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-12-04 22:17:21 +00:00
Ryan Macnak 7381222387 [build] Don't create a second copy of executables compiled with -fPIC.
build.py -mrelease runtime
4169 -> 2711 build steps

Change-Id: I679b2d7b34fd598deffc66e3bf10c48b02e9d764
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398944
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-12-04 21:41:51 +00:00
Ivan Inozemtsev 68800e6c0d Fix toolchain_cpu for clang_x64 android toolchain
Similar to https://dart-review.googlesource.com/c/sdk/+/396260, it
looks like the value for `android_app_abi` was used for `cpu`, but
before https://dart-review.googlesource.com/c/sdk/+/392661 `current_cpu`
wasn't actually set to `toolchain_cpu`.

Fixes https://github.com/dart-lang/sdk/issues/59621

Change-Id: Icf3a36c2b6d58c5979bb71ea67a864b658abc514
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397901
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2024-11-27 14:28:21 +00:00
Ivan Inozemtsev a999cec694 Separate toolchains for shared libraries
1. Added `toolchain_suite` template and switched toolchain definitions
to it, so now each toolchain definition defines a regular and
`_shared` toolchain, with different values for `is_shared_library`
argument.
2. Changed the logic of choosing between `fPIC` and `fPIE` based on
`is_shared_library` arg.
3. Changed `shared_library` template to define a group, depending on
the same target in a shared toolchain, and a copy of an output
artifact.
4. Made a copy of `runtime:dart_shared_lib` config and add it
automatically to all shared libraries.
5. Removed `runtime:dart_shared_lib` config and `DART_SHARED_LIB`
define from existing `shared_library` targets.

This CL should be a no-op refactoring to enable
https://dart-review.googlesource.com/c/sdk/+/394102.

TEST=ci

Change-Id: I6c044254d8e74b6b3ddadbf784e58d5f641fbcf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392661
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-26 11:48:51 +00:00
Ivan Inozemtsev 242406b2b4 Fix toolchain_cpu for clang_arm64 android toolchain
That's the only mention of `aarch64` in a context of cpus:
https://github.com/search?q=repo%3Adart-lang%2Fsdk%20path%3A*.gn*%20aarch64&type=code.

Similar to https://dart-review.googlesource.com/c/sdk/+/395300, I
believe it works correctly now only by accident, because `current_cpu`
defaults to `target_cpu`, and `toolchain_cpu` is unused.

However when using mulitple toolchains, `current_cpu` is set to
`toolchain_cpu`, and config evaluation fails at
https://github.com/dart-lang/sdk/blob/246050a1ef6233d9574ce6a30d30506e004fef3d/build/config/android/config.gni#L107

Change-Id: Ic3b3ab4afecf00556f0420800f058ebe4c64fa70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396260
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-19 20:47:10 +00:00
Johnni Winther 808fa4ca8b [cfe] Move tool/_fasta/ to tool/
Change-Id: I5b7348fb4adb4e7f4039c91d54d712c1eb131ecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395002
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-11-18 07:49:01 +00:00
Ivan Inozemtsev f8569331e1 Fix toolchain_os in ios toolchain definitions
I think it worked correctly before only by accident, because of the
fallback to `target_os` in build config: https://github.com/dart-lang/sdk/blob/0906af6d2f6cf8ae1eff52a93adccdaf90d13443/build/config/BUILDCONFIG.gn#L48).

However when buildconfig is re-evaluated with toolchain
args, current_os is set to a toolchain_os at https://github.com/dart-lang/sdk/blob/0906af6d2f6cf8ae1eff52a93adccdaf90d13443/build/toolchain/mac/BUILD.gn#L260, which causes linking issues in https://dart-review.googlesource.com/c/sdk/+/392661 (https://ci.chromium.org/ui/p/dart/builders/try/vm-mac-debug-arm64-try/12692/overview).

Change-Id: I9c6129ad40a7ec26fde47816810241850b6f816f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395300
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-11-14 21:08:12 +00:00
Ryan Macnak 0a238b3828 [vm] Update to C++20.
- There is no C20, so that stays at C17
 - Math between different enum types disallowed, use explicit cast
 - operator++ removed from volatile types
 - stream print for wchar_t removed

TEST=build
Bug: https://github.com/dart-lang/sdk/issues/42074
Change-Id: Ie552b0bf24f8ac8991336c61fd4bd4913da42909
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393622
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-11-12 20:28:50 +00:00
Alexander Aprelev 073a700517 [build/win] Roll crashpad and minichromium deps.
Roll not to the lastest, but to the one before move to breaking c++20 changes in those deps.

Pulls changes and fixes to crashpad from 10/22/2018 to 1/10/2024.

TEST=ci

Change-Id: I1ff37eaec91ea6b1fb3d73b38b360b2e8d88a47c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393903
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-11-07 20:30:22 +00:00
Matan Lurey acc66a77fe Forward GN metadata from dart_action and friends.
In the Flutter engine, we plan to expand and start using Dart actions to
rely more on the GN build system, and less on home-grown (Python/Bash)
tooling. To that end, we'll start generating dart_snapshot and dart_test
rules that are invokved the same way locally (via `et`) and on CI, with
a goal of making all of our tests programatically discoverable.

We need the `metadata` field (a standard GN field) in order to tag our
outputs (i.e. `metadata = { action_type = ['dart_executable'] }`);
see https://gn.googlesource.com/gn/+/main/docs/reference.md#var_metadata.

Bug: https://github.com/flutter/flutter/issues/147013
Change-Id: I0e44209b8aade13cec99b944583a90a7c13d3300
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386582
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-09-24 18:51:23 +00:00
Ryan Macnak 640724dc2a [build] Report the exit code for failed build-time executions.
Bug: https://github.com/dart-lang/sdk/issues/56529
Change-Id: Idc0e41091491b144c12056dca2eb441444c2af0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384400
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-09-09 18:38:23 +00:00
Hzj_jie 689f8d6826 [fuchsia] Remove duplicate gn_configs and uprev test-scripts
Change https://crrev.com/c/5823950 moved most of the gn_configs to
fuchsia-gn-sdk, and they are not needed to be repeated again in
the gn_configs.gni anymore

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try,vm-fuchsia-release-arm64-try
Bug: http://crbug.com/359657446
Change-Id: I2be62484f2f5279a8804f81714bf0db22ef4384c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382761
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-09-09 17:40:35 +00:00
Alexander Markov 21561b023b [gardening] Fix TSAN build
TEST=tools/build.py --mode=release --arch=x64 --sanitizer=tsan runtime dart_precompiled_runtime

Change-Id: I7b7f432fe6ae4a2f6cd916c215476a0f93d14bed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383445
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-09-04 00:30:27 +00:00
Ivan Inozemtsev ad15bc4b47 Add support for iOS target os
- `build/mac/find_sdk.py` can search for iPhone and Watch SDKs and their simulators
- `tools/build.py` supports `--os=ios` and `-os=ios_simulator` now. Treating simulator as a separate os to minimize changes and avoid an additional dimension for configs.
- `vm-mac-(release|debug)-arm64-try` tryjobs make sure a shared library builds successfully for ios.

TEST=ci

Change-Id: I76358ec8fd33752260bf0b8462da22a13cd7562e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381623
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-09-03 19:53:58 +00:00
Hzj_jie aa3c910027 [fuchsia] use the api-level from gn-sdk and uprev test-scripts
https://crrev.com/c/5805927 provides the default api-level in gn-sdk,
so as long as we have the latest gn-sdk / skia setup, the api-level
would be updated automatically.

And since I am here, I updated the version of test-scripts as the
skia roller of it hasn't been enabled yet.

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Bug: b/347373793
Change-Id: I0b45df7981b130b19d3158a2e0f58a1ed224d2c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381883
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-08-26 19:34:08 +00:00
Alexander Markov 3d8829fad2 Add dart2bytecode snapshot and VM/AOT dynamic modules test configurations
Change-Id: I84f8dbc174dbac5a11ca84e248c7aecb3759aaad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380283
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-15 15:28:25 +00:00
Hzj_jie 99da8ce289 [fuchsia] reduce the standalone commands in fuchsia integration
multiple processes are now aggregated by one test_env_setup call.

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Bug: http://crbug.com/356463343
Change-Id: Ib41bd2b36eb5d06ceeb6b834f1024365650e0ca0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379560
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-08-13 18:04:17 +00:00
Ryan Macnak cbb4176bea Roll icu to 43953f57b037778a1b8005564afabe214834f7bd.
Embed the Flutter version of icutl.dat to keep \p{Emoji} etc working.

TEST=corelib/regexp/unicode-property-binary_test
Bug: https://github.com/dart-lang/sdk/issues/50248
Change-Id: I91124690160fead3e1ba841f4244595ba338387c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375180
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-07-17 16:47:50 +00:00
Ryan Macnak b82383953d [build] Link with lld on Windows when using Clang.
- Make the build deterministic

Bug: https://github.com/dart-lang/sdk/issues/55995
Change-Id: Ic800dd66f23bc402dfede09db3f67f01aa82d29d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373360
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-07-02 21:16:39 +00:00