1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-05 09:20:04 +00:00
Commit Graph

318 Commits

Author SHA1 Message Date
なつき
867610409a [infra] Update alpine sysroot
Closes https://github.com/dart-lang/sdk/pull/55255

GitOrigin-RevId: d754c894720403f1a4c712855ed3fc718b6d2d06
Change-Id: I577f03977025156f14dc7207c0a50fde6fc0c10c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358860
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-03-21 10:43:15 +00:00
Zijie He
476ed37a25 Reland "[Fuchsia] Remove the legacy gn build rules for fuchsia"
This change may require a codereview from flutter side before moving
forward. See https://github.com/flutter/engine/pull/51072.

This reverts commit 283051acba.

Reason for revert: Redo the change with the similar one in flutter.

After this change, the next dart -> flutter roll needs extra cares
in https://github.com/flutter/engine/pull/51072. It also contains
more details about the reason why it could not be two-way
compatible.

Original change's description:
> Revert "[Fuchsia] Remove the legacy gn build rules for fuchsia"
>
> This reverts commit 094202bb91.
>
> Reason for revert: Break flutter, this change should happen after
> flutter being migrated to the same gn-sdk.
>
> Original change's description:
> > [Fuchsia] Remove the legacy gn build rules for fuchsia
> >
> > The updated test-scripts contains https://crrev.com/c/5341620 which
> > allows to generate fidl apis with an env var controlled location
> > rather than a hard-coded one. So the existing fuchsia gn build rules
> > in dart/sdk become obsolete and can be fully removed in favor of the
> > one in //third_party/fuchsia/gn-sdk/.
> >
> > Meanwhile the gn-sdk has been updated with
> > https://crrev.com/c/5325282 to use api-level version'ed idk but not
> > the ones in arch/.
> >
> > Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
> > Tested: ^^^^^
> > Bug: 40935282
> > Change-Id: I2ce958e6db1ff8221beef7b7ff953c32bb4525ba
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355283
> > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> > Reviewed-by: Alexander Thomas <athom@google.com>
> > Commit-Queue: Zijie He <zijiehe@google.com>
>
> Bug: 40935282
> Change-Id: I7c455d1d362210523671c97d99ef018ede1743f4
> Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356307
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Zijie He <zijiehe@google.com>
> Reviewed-by: Derek Xu <derekx@google.com>
> Commit-Queue: Zijie He <zijiehe@google.com>

Bug: 40935282
Change-Id: Id5a9a98013350359037b19f8506f24158c9a3120
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356924
Commit-Queue: Zijie He <zijiehe@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-03-14 20:22:12 +00:00
Zach Anderson
03101837d9 [gn] Deprecate copy_trees()
Part of https://github.com/flutter/flutter/issues/144430

This is a reland of https://dart-review.googlesource.com/c/sdk/+/356481 with the addition of dependencies to prevent races on directory creation.

Previously, this code did backflips to accomplish two goals
1. Collect the paths of all files that would be copied from one place to another after applying regex filters so that they could be listed as the "inputs" to a GN action.
2. Arrange so that the python script doing the above would only be invoked once during GN to reduce the cost of calling out to python.

However, this is exactly the use-case for the "depfile" parameter to a GN action. Instead of running the script during GN to populate the "inputs" list, when we run the copy_tree.py script, we can instead ask it to generate a depfile to collect all the input files that were actually copied after applying the regex filter. Using that, we don't have to run the python script at all during GN.

TEST=it builds

Change-Id: I593e2500544a9fff5dd9852d0d3370f97aafc464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356620
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2024-03-09 04:14:39 +00:00
Zach Anderson
939ae55c00 Revert "[gn] Deprecate copy_trees()"
This reverts commit f60d32167f.

Reason for revert: build failures in post submit

Original change's description:
> [gn] Deprecate copy_trees()
>
> Part of https://github.com/flutter/flutter/issues/144430
>
> Previously, this code did backflips to accomplish two goals
> 1. Collect the paths of all files that would be copied from one place to another after applying regex filters so that they could be listed as the "inputs" to a GN action.
> 2. Arrange so that the python script doing the above would only be invoked once during GN to reduce the cost of calling out to python.
>
> However, this is exactly the use-case for the "depfile" parameter to a GN action. Instead of running the script during GN to populate the "inputs" list, when we run the copy_tree.py script, we can instead ask it to generate a depfile to collect all the input files that were actually copied after applying the regex filter. Using that, we don't have to run the python script at all during GN.
>
> TEST=it builds
>
> Change-Id: I41a251ce4659119cdc3997bb2d6fc7ee0831bb6d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356481
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>

Change-Id: Ie4409ed93a3c990fbce375dba1f2d9a3c735ea3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356308
Auto-Submit: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Zach Anderson <zra@google.com>
2024-03-08 20:59:53 +00:00
Zijie He
283051acba Revert "[Fuchsia] Remove the legacy gn build rules for fuchsia"
This reverts commit 094202bb91.

Reason for revert: Break flutter, this change should happen after
flutter being migrated to the same gn-sdk.

Original change's description:
> [Fuchsia] Remove the legacy gn build rules for fuchsia
>
> The updated test-scripts contains https://crrev.com/c/5341620 which
> allows to generate fidl apis with an env var controlled location
> rather than a hard-coded one. So the existing fuchsia gn build rules
> in dart/sdk become obsolete and can be fully removed in favor of the
> one in //third_party/fuchsia/gn-sdk/.
>
> Meanwhile the gn-sdk has been updated with
> https://crrev.com/c/5325282 to use api-level version'ed idk but not
> the ones in arch/.
>
> Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
> Tested: ^^^^^
> Bug: 40935282
> Change-Id: I2ce958e6db1ff8221beef7b7ff953c32bb4525ba
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355283
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Zijie He <zijiehe@google.com>

Bug: 40935282
Change-Id: I7c455d1d362210523671c97d99ef018ede1743f4
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356307
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Zijie He <zijiehe@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-03-08 20:50:31 +00:00
Zach Anderson
f60d32167f [gn] Deprecate copy_trees()
Part of https://github.com/flutter/flutter/issues/144430

Previously, this code did backflips to accomplish two goals
1. Collect the paths of all files that would be copied from one place to another after applying regex filters so that they could be listed as the "inputs" to a GN action.
2. Arrange so that the python script doing the above would only be invoked once during GN to reduce the cost of calling out to python.

However, this is exactly the use-case for the "depfile" parameter to a GN action. Instead of running the script during GN to populate the "inputs" list, when we run the copy_tree.py script, we can instead ask it to generate a depfile to collect all the input files that were actually copied after applying the regex filter. Using that, we don't have to run the python script at all during GN.

TEST=it builds

Change-Id: I41a251ce4659119cdc3997bb2d6fc7ee0831bb6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356481
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-03-08 20:47:47 +00:00
Zijie He
094202bb91 [Fuchsia] Remove the legacy gn build rules for fuchsia
The updated test-scripts contains https://crrev.com/c/5341620 which
allows to generate fidl apis with an env var controlled location
rather than a hard-coded one. So the existing fuchsia gn build rules
in dart/sdk become obsolete and can be fully removed in favor of the
one in //third_party/fuchsia/gn-sdk/.

Meanwhile the gn-sdk has been updated with
https://crrev.com/c/5325282 to use api-level version'ed idk but not
the ones in arch/.

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Tested: ^^^^^
Bug: 40935282
Change-Id: I2ce958e6db1ff8221beef7b7ff953c32bb4525ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355283
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-03-07 18:26:59 +00:00
Zach Anderson
bcb253faf9 [gn] Clean up some vestiges of building in the Fuchsia tree
Part of https://github.com/flutter/flutter/issues/144430

Change-Id: I6103f5a7fec76b82209845cb027c23bdb86da5ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355624
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-03-05 15:02:49 +00:00
Jonas Termansen
3f1d6a99e7 [infra] Simplify RBE configuration and allow concurrent builds.
Automatically detect the appropriate configuration file if RBE=1 is
set to request RBE on all projects, or if DART_RBE=1 is set to request
RBE for Dart only, or otherwise respect the explicit configuration file.

Automatically set the server_address location to the build directory
if it has not already been set. This is unfortunately not supported on
Windows due to the environment variable being set during build but it
needed to be set during gn.

Retain the older configuration files during the transitory period.

Bug: b/296994239
Fixes: b/320876546
Change-Id: I62d1fbfed35248477731cceda3f7267c605c4969
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355400
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-03-04 14:54:26 +00:00
Jonas Termansen
a19d3f3375 [infra] Support testing with RBE on Windows.
Place the windows toolchain in the build root so it can be sent to RBE.

Use relative paths in debug symbols when building with Windows clang,
which is needed for remotely building with RBE.

Set the executable bit when invoking clang-cl remotely as it has not
been set on Windows RBE clients.

Stop including .rst files during build commands as @options-from-file
is not supported by rewrapper at this time.

Forward RBE_cfg into the msvc build environment and rewrite the
INCLUDE, LIB, and LIBPATH environment variables to use relative paths
instead of absolute paths.

Don't download reclient on windows-arm64 where there is no cipd
package and the windows-arm64 python lies and says it's x64 because
they actually packaged a x64 python.

Tune the Windows -j performance to match the historic bot performance
as most casual Windows machines won't handle -j 1000 well.

Bug: b/296994239
Change-Id: I2bd1b4478fca796f0a326c062a5f478f16c2c6ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343440
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-02-29 10:33:09 +00:00
Ryan Macnak
74baf5e75a [build] Set minimum version for Windows to 10.
Bug: https://github.com/dart-lang/sdk/issues/54509
Change-Id: Ia52415c7eeea031dd0e8a27b6840b1e59b2baf6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353786
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-02-23 00:22:25 +00:00
Ryan Macnak
d67f159332 [vm] Fix using GCC with the sanitizers.
TEST=local
Change-Id: Icb47e2c68e55ae14f806cb421b8d860cda4d1f1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350647
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-02-21 20:15:15 +00:00
Daco Harkes
3d1f22a79b Revert "Roll zlib to 646b7f569718921d7d4b5b8e22572ff6c76f2596."
This reverts commit 2f90c9c8ce.

Reason for revert: Build failures for Android.

```
ERROR at //third_party/zlib/BUILD.gn:349:17: Can't load input file.
      deps += [ "//third_party/cpu_features:ndk_compat" ]
```

Original change's description:
> Roll zlib to 646b7f569718921d7d4b5b8e22572ff6c76f2596.
>
> Change-Id: I5c222fbacce6e89226d450534c7f9400cb6d2164
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352044
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Brian Quinlan <bquinlan@google.com>

Change-Id: I38f345e7576d8a166518ed37a9f32f249e6ca1a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352221
Reviewed-by: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-02-13 10:03:56 +00:00
Ryan Macnak
2f90c9c8ce Roll zlib to 646b7f569718921d7d4b5b8e22572ff6c76f2596.
Change-Id: I5c222fbacce6e89226d450534c7f9400cb6d2164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352044
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2024-02-12 23:45:20 +00:00
Ryan Macnak
9f7dbd6b4d Roll Fuchsia SDK to 18.20240208.2.1.
Sync build setup from Flutter.

Change-Id: Ic7958dc42a79b7d2acd3f5279f816333ca31299e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351242
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-02-12 18:18:01 +00:00
Alexander Aprelev
6ab194a95b [build] Update Windows SDK to 10.0.22621.0.
Sync setup_toolchain.py, vs_toolchain.py, find_depot_tools.py with chromium tot 2a6e67243533df4913d06814019b99a8b3ea385b

BUG=https://github.com/dart-lang/sdk/issues/54630

Change-Id: I42f79900951f228d8c9711fee3cab7db22f96e19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350655
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-02-08 16:06:50 +00:00
Ryan Macnak
362e5784b5 Roll boringssl to d24a38200fef19150eef00cad35b138936c08767.
TEST=ci
Change-Id: I789fd6c238743f040c229e342880392af2e118ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348761
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-01-29 23:24:36 +00:00
Zijie He
9c7d3e4152 [Fuchsia] Update test-scripts to include https://crrev.com/c/5177940
ffx will change the way product lookup prints out the download url,
but the original solution is less ideal and using json is definitely
better.

So using the latest test-scripts would be a must-have before updating
the fuchsia-sdk.

A drive-by change is to return proc.returncode from with_envs.py.

Change-Id: Ic4589597006226aa7f5b0e557fe1f084ad3a0a74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345567
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-01-11 19:05:48 +00:00
Jonas Termansen
c348fd0865 Fix RBE llvm wrapper setting the world on fire.
I don't want to set the world on fire.

Change-Id: Icef12a8398eee6cf78b8852ccba73a318c8c5563
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345542
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2024-01-10 14:56:18 +00:00
Jonas Termansen
80418d5709 Fix RBE through llvm if the source file is linked to the destination.
Change-Id: I97c3321c729c2a0d62a910d5deb50c4876fe6305
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345540
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2024-01-10 14:41:51 +00:00
Jonas Termansen
5678fd48cd [infra] Generalize RBE across operating systems.
Bug: b/296994239
Change-Id: Ie8630bcece5c2f62c5693afe654fb9d6367b33e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345286
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-01-10 11:38:43 +00:00
Zijie He
882e883be2 [Fuchsia] Remove product.experimental
The SDK version is way ahead of https://fxrev.dev/841540 and the config
is not necessary anymore.

https://github.com/dart-lang/sdk/issues/38752
Change-Id: Ic8de02bdbb7b2c88ce742d39bce686c00fd97d8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344440
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-01-08 18:54:43 +00:00
Jonas Termansen
a5109dc82b [build] Handle RBE in -fdebug-prefix-map.
The RBE build happens in a different working directory when run
remotely and the -fdebug-prefix-map option with a local path inhibits
cache sharing between tryjobs and developers. This change fixes the
RBE object files so they don't contain the remote absolute path and
also ensures the build commands can be cache shared.

Bug: b/296994239
Change-Id: I6d2cd42fd775724ccb5c335c85b5f31ad279624f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342342
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-12-19 10:28:33 +00:00
Jonas Termansen
2ff976e9e3 [infra] Specify Linux in RBE platform.
Bug: b/296994239
Change-Id: Ice6ed1bda597e300600d6d6823901ec21f5cfcd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342420
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-19 10:23:52 +00:00
Ryan Macnak
bd5df6da60 [build] Enable building riscv64 with clang.
Change-Id: Ie09d92a4e23484b7c6d2963bb0d327e443a68e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338641
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-30 18:09:49 +00:00
Jonas Termansen
750050ec40 [infra] Enable RBE on Android.
The sysroot needs to be passed as a relative path inside the exec root
since RBE will fail to compile with an absolute path.

Bug: b/296994239
Change-Id: Idc0e155368daaf904ac4650bd8668b8955d09e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338002
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-11-24 14:02:27 +00:00
Jonas Termansen
53eabe4824 [infra] Enable RBE on Linux intel.
This change migrates the Dart linux builders from Goma to RBE via
reclient. Goma is being shut down by the end of the year and we must
migrate to the new replacement, which is much more powerful and can do
things we could never do with Goma. We should already see some mild
build time improvements from simply switching.

This change can be safely reverted if there are any problems:

- If you must revert this change, please reach out with what you
  observed, but please first read and try the below instructions.

- Cross-compilation with RBE is not implemented at this time and certain
  special builders running on Linux intel may not support RBE. The
  existing configuration support to disable Goma remains in place. The
  existence of configuration file makes the recipe switch all Linux x64
  bots use RBE rather than Goma. Try disabling Goma on any builders that
  are failing, whether using `--no-goma` in the test matrix or using
  `goma = False` on infra/config. Goma is going away soon and we will
  soon bring RBE up to feature parity and Goma isn't really working on
  the special cross builds anyway.

- Rare flakes in the remote builds have previously been observed, but I
  haven't seen them reappear yet after upgrading reclient. Look for
  build log messages mentioning the remote execution failed, or that an
  upload blob size digest mysteriously changed. Please alert me if you
  see this and I will talk to the Foundry team. If this happens, please
  try if you can fix this using `exec_strategy=remote_local_fallback` in
  the configuration file. Right now reclient only does remote executions
  to catch cases where RBE doesn't work, but if it fails, it can be
  configured to silently fall back on a slow local build.

- If RBE is used on a configuration that doesn't support RBE builds, the
  default -j 1000 may overload the bot if it falls back on a local
  build. If this happens, the bot may explode and fail with BOT_DIED. If
  this happens, disable Goma (RBE) on the builder as above and let me
  know about the problem.

- We haven't tried sending a full production load to the RBE pool yet.
  Flutter is already using the RBE pool partially. It's unclear what
  will happen once we turn this on for everyone. Keep an eye out for
  anything unusual and let me know.

- If it turns out RBE doesn't cache invalidate properly, it is possible
  outdated object files will be linked. If anything really weird
  happens, this may the case. As far as I tested, the caching is working
  correctly.

RBE is yet to be officially rolled out to our developers. Stay tuned.

Bug: b/296994239
Change-Id: I77e0025197ab98a672efbc0cb04c8ece528c3e29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335826
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-11-22 15:44:09 +00:00
Jonas Termansen
6a08407c6f [infra] Bump reclient and don't RBE on gcc.
This is a no-op since RBE is not enabled anywhere yet.

Bug: b/296994239
Change-Id: I2d39419736fca0382a6082f6be64e787348bb825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336440
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-11-15 16:47:49 +00:00
Ryan Macnak
63aaca8c9a [build] Switch to Fuchsia core SDK.
build/fuchsia/gn-sdk is a copy of the current GN SDK with paths adjusted.
The rest of build/fuchsia comes from Flutter.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: I192cca955d05991bde3931d053df9835c5a2195d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334142
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-10 19:23:11 +00:00
Vyacheslav Egorov
4ce23629eb [gn] Support producing signed builds on Mac
This can be controlled via  codesigning_identity GN arg.

For example, setting codesigning_identity="-"
would produce ad-hoc signed binaries.

This CL also includes changes in vm/cc tests which are needed
for tests to be green when running with hardened runtime.

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

Tested: enabled ad-hoc signing and tested on bots.
Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-mac-debug-x64-try
Change-Id: I3c3a6265c62b2904e43a326b7d8223bcfd393577
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333401
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-11-03 07:36:25 +00:00
Ryan Macnak
ee79d8e4b8 [build] Use Fuchsia-provided sysroot.
- Adds RV64 support
- Toolchain and sysroot will come from the same place

Change-Id: Ic835de7667a334dc450e89b979bf19950f77efc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331746
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-02 14:39:10 +00:00
Ryan Macnak
573fad4ff0 [test] Cleanup building Fuchsia packages/components.
Build one package with three elf_test_runner components: one for each of the binaries that the test harness invokes on the target. (Though currently only tests that use "dart" are setup.)

Create includable CML shards for the capabilites required by the AOT and JIT VMs.

Fold test_runner's fuchsia_cfv2.dart back into fuchsia.dart.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: I7bd8d43d184cbcb11903c7aed77ce31fb30cb894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332451
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-31 17:11:51 +00:00
Ryan Macnak
4fa5cadb36 [test] Switch Fuchsia testing to CFv2.
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: Id6519937cfa8430249d576c99aeb6bdb9f97dbb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332481
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-30 20:03:40 +00:00
Ryan Macnak
aac74693f5 [build] Avoid GN warning about use_rbe being set but never declared.
Change-Id: Id4ae1a6edf1a757eac3916079345cf3926f71b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332164
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-25 21:15:05 +00:00
Jonas Termansen
f4f557345c [infra] Reland "Begin RBE Linux x64 support."
Bug: b/296994239
Change-Id: I179cc7729846885ee952d26082a1e615a46a30b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331923
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-24 14:36:19 +00:00
Alexander Thomas
d37620ed03 Revert "[infra] Begin RBE Linux x64 support."
This reverts commit 9a11fe517c.

Reason for revert: broke the build for some users.

Original change's description:
> [infra] Begin RBE Linux x64 support.
>
> Bug: b/296994239
> Change-Id: I0ddf9a1beb2996ac67b59779b8b8113432434786
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331282
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Jonas Termansen <sortie@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: b/296994239
Change-Id: Id70259b9357790581f11f105516ff0c6c63ab1ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331780
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-23 16:45:47 +00:00
Jonas Termansen
9a11fe517c [infra] Begin RBE Linux x64 support.
Bug: b/296994239
Change-Id: I0ddf9a1beb2996ac67b59779b8b8113432434786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331282
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-23 14:42:59 +00:00
Ryan Macnak
99bb8aa4a5 [build, test_runner] Update to NDK 27.
Notably, this carries us across the gcc->llvm transition.

Change-Id: I46203749c64c7ef0f52de40abcd4a073517cb06f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330949
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-10-18 22:38:23 +00:00
Ryan Macnak
90d488b98e [build] Android RISCV64 using a Canary NDK.
Change-Id: I447941fd4eee0c1e4394b3ab5c0b9c36a7b4c257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330701
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-17 16:34:27 +00:00
Zijie He
a46ac84206 [Fuchsia] Allows FuchsiaEmulatorCFv2 to start daemon and emulator
This change updates the FuchsiaEmulatorCFv2 to start the daemon and
emulator before executing the tests.

Meanwhile, instead of "dummy", this change uses "echo" as the dummy
command to allow
`FUCHSIA_CFV2=1 tools/test.py --progress=status
-nvm-fuchsia-release-x64 ffi`
running.

This change requires
`"fuchsia_sdk_version": "version:15.20230909.2.1",`
in DEPS to function, which isn't included due to the CFv1
implementation currently running.

Bug: #38752
Change-Id: I5011b6ff39b73955002431650d973d6adcfa6246
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328766
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-03 22:56:39 +00:00
Ryan Macnak
8e6191c7f9 [build] Include FPESAN in UBSAN.
TEST=ubsan
Bug: b/301044910
Change-Id: I608dd742a243bc1ab620c92da46e48270d6b060f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327041
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-09-21 15:16:39 +00:00
Zijie He
5282f6e33f [Fuchsia] Create CFv2 support
This change created a CFv2 build target and provided two
implementations of the FuchsiaEmulator, so that I can continually work
on both CFv2 build and test script integration independently.

The v2 target can be built with
```
tools/build.py --os fuchsia --mode release fuchsia_ffi_test_package_cfv2
```
And v2 FuchsiaEmulator implementation can be triggered with
FUCHSIA_CFV2 environment variable.

Bug: #38752
Change-Id: I31936a2ca967fbfeb2bc5628e2f005aef6762687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322583
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2023-09-12 01:40:52 +00:00
Ryan Macnak
b8ee3a9996 [build] Don't export all symbols to the dynamic table.
We were exporting all symbols to the dynamic table so that they could be looked up using `dladdr` for the profiler and backtracer. The symbols include our statically-linked libcxx, which can create trouble when another DSO has a different version of libcxx. Now we export only the VM embedding API functions (`Dart_*`) and use a specially produced table to do the symbolization.

TEST=runtime/tests/vm/dart/exported_symbols_test.dart
TEST=runtime/tests/vm/dart/symbolized_crash_test.dart
Bug: https://github.com/dart-lang/sdk/issues/53267
Change-Id: I2ee494fba86f67127ba0f6f402622f01a4662207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323702
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-09-05 21:47:59 +00:00
Zijie He
21ae9657a9 [Fuchsia] Import test scripts from chromium and use it to download image
The with_envs.py works with the test script by providing the required
environment variables.

This change in theory does nothing since the `product download` is in
12.20230413.0.1, but `run` is removed before that,
https://fxrev.dev/831319. So the DEPS cannot really download the images.
The issue will be addressed in a coming change.

Bug: #38752
Change-Id: Ib5f3d1d619921651208fa442201ba607a99e54d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319867
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2023-08-22 19:59:25 +00:00
Ryan Macnak
6dcbc9fc14 [vm] Support 16k page size on Android.
- Increase the size of the FFI trampoline template.
 - Increase alignment of ELF binaries generated by the VM.
 - Pass flags for binaries generated by the NDK's linker increase alignment.
 - Runtime allocation already either rounds up to the runtime-queried page size or assumes it is no more than 512k.

TEST=ci, readelf
Bug: go/16k-app-guide
Change-Id: I4fdb2a47534a6a24875e205c3a357b5415ca18b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321302
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-08-17 17:38:48 +00:00
Vyacheslav Egorov
5ddb1b8ea7 [vm/service] Use getline to read /proc/self/smaps
Previously the code was using `fgets` with a fixed
size buffer. This lead to a confusing behavior where
lines longer than 255 characters would be read
in multiple chunks and cause crashes in the parsing code.

Additionally make extraction of the path component slightly
more robust by searching for path field forward rather than
backwards. Path might contain white space and searching
backwards might stumble on that.

This is a reland of 95474f44f1
with changes to android min-sdk to make android ARM builds
succeed (getline requires SDK 18+).

TEST=manually

Change-Id: I8b36fcd178680aed7f856bc884a5cd188a5f6e85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319480
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-08-09 12:59:31 +00:00
Ryan Macnak
03d1f9392d [build] Build libcxx from source when using TSAN.
Bug: https://github.com/dart-lang/sdk/issues/46699
Change-Id: I8baf9cca4b7cf2689844366a9e4f1875a680e888
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314581
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-07-18 23:01:12 +00:00
Ryan Macnak
dbd7b967af [fuchsia] Plumbing for the VMEX resource.
TEST=ci
Change-Id: I2e812e6eef2a3c6f91aec955609ece2ca4df15a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308805
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-06-20 19:28:18 +00:00
なつき
67e9580b04 [infra] Add sysroot config for alpine linux riscv64
Closes https://github.com/dart-lang/sdk/pull/52680

GitOrigin-RevId: e78a58114f173c8de16c2c7ab27fd5f983286860
Change-Id: I666ba58c36185f7f543c507c07a9f5a7ef1f1a5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308643
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-06-13 09:53:05 +00:00
Ryan Macnak
6cec462d24 [build] Embed the default manifest on Windows.
This sets the requested UAC level to "asInvoker", which prevents "installer detection" from automatically deciding to request elevated privileges.

Change-Id: I031ab27dacf23d3ef9956fbda0b855156f2bded9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307973
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-06-12 22:04:21 +00:00