1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-05 17:30:16 +00:00
Commit Graph

285 Commits

Author SHA1 Message Date
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
なつき
2ea4fbea1f [infra] Enhance Alpine Linux sysroot support
Closes https://github.com/dart-lang/sdk/pull/52663

GitOrigin-RevId: 0f78e2bd9260597b5a06876217e2e03e1f2e420c
Change-Id: I015c9989a59a97c792df883201cd722c2dfc20cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308420
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-06-12 08:29:41 +00:00
Alexander Thomas
033fa5e684 [build] Remove unused pipes import from vs_toolchain.py
Fixes: https://github.com/dart-lang/sdk/issues/52605
Change-Id: If10b44eb94a2ab5b3fb087a49e60e6bf04afcb0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307620
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-06-06 10:45:24 +00:00
Ryan Macnak
9ad313a747 [build] Relativize DW_AT_comp_dir to the source root instead of the build root.
I.e., DW_AT_comp_dir changes from `../../out/DebugX64` to `out/DebugX64`.

With this change, gdb can find sources without needing to be told `dir out/DebugX64`.

Change-Id: I67d6de8fbca056f84e681261f2def2e199c1863b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305581
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-25 18:00:27 +00:00
Ryan Macnak
ddc11f8084 [build] Build the standard c++ library from source.
This allows it to be instrumented by the sanitizers.

Enabled only for MSAN and for Android.

Don't pick up Flutter's including no_exceptions in the default config set.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/44312
Bug: https://github.com/dart-lang/sdk/issues/44377
Bug: https://github.com/dart-lang/sdk/issues/43075
Bug: https://github.com/dart-lang/sdk/issues/50248
Bug: https://github.com/dart-lang/sdk/issues/50271
Bug: https://github.com/dart-lang/sdk/issues/52441
Change-Id: If01704ff29569fba8f8181ed31d52faba8d8370f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304824
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-22 23:38:58 +00:00
Ryan Macnak
5fde4fb067 Revert "[build] Build the standard c++ library from source."
This reverts commit bd589d4e54.

Reason for revert: breaks dart-sdk-linux-riscv64-main

Original change's description:
> [build] Build the standard c++ library from source.
>
> This allows it to be instrumented by the sanitizers.
>
> Enabled only for MSAN and for Android.
>
> TEST=ci
> Bug: https://github.com/dart-lang/sdk/issues/44312
> Bug: https://github.com/dart-lang/sdk/issues/44377
> Bug: https://github.com/dart-lang/sdk/issues/43075
> Bug: https://github.com/dart-lang/sdk/issues/50248
> Bug: https://github.com/dart-lang/sdk/issues/50271
> Bug: https://github.com/dart-lang/sdk/issues/52441
> Change-Id: I96241e6ee28fb2a853d4a113aac268bc415a5fd5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304147
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Daco Harkes <dacoharkes@google.com>

Bug: https://github.com/dart-lang/sdk/issues/44312
Bug: https://github.com/dart-lang/sdk/issues/44377
Bug: https://github.com/dart-lang/sdk/issues/43075
Bug: https://github.com/dart-lang/sdk/issues/50248
Bug: https://github.com/dart-lang/sdk/issues/50271
Bug: https://github.com/dart-lang/sdk/issues/52441
Change-Id: I0b1d0c0da1cd77e0f9645facfc58397cc216c584
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304823
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-05-22 21:09:09 +00:00
Ryan Macnak
bd589d4e54 [build] Build the standard c++ library from source.
This allows it to be instrumented by the sanitizers.

Enabled only for MSAN and for Android.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/44312
Bug: https://github.com/dart-lang/sdk/issues/44377
Bug: https://github.com/dart-lang/sdk/issues/43075
Bug: https://github.com/dart-lang/sdk/issues/50248
Bug: https://github.com/dart-lang/sdk/issues/50271
Bug: https://github.com/dart-lang/sdk/issues/52441
Change-Id: I96241e6ee28fb2a853d4a113aac268bc415a5fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304147
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-05-22 17:48:03 +00:00
Ryan Macnak
60441151ce [build] Consistently use either gcc/binutils or clang/llvm.
Change-Id: I855c06f7af1d602d5e83cf547b9f18092062ac83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304541
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-22 15:57:18 +00:00
Ryan Macnak
3c06a5aa17 [build] Update Android SDK to match Flutter.
TEST=ci
Change-Id: Ic86332a60fe570d0e79272869284a69ea109edef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303520
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-16 16:32:58 +00:00
Brian Quinlan
32abc0a682 Add a note saying that calls to SecTrustEvaluate should be removed
Bug: https://github.com/dart-lang/sdk/issues/47820
Change-Id: I3c2321bbbd77d789b4021162f1add98a71b96cd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296424
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-05-04 16:43:06 +00:00
Lasse R.H. Nielsen
a71fde3b08 Fix typo in path in .gni file.
It's probably not used for anything, since the typo didn't matter.

Change-Id: I5bdea988aeec6dfc142d0bb26e3a438840c45810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300242
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-05-02 18:59:10 +00:00
lauren n. liberda
22d666d67a add tools for generating shim headers
Closes https://github.com/dart-lang/sdk/pull/51612

GitOrigin-RevId: 7e71761d5f13e9dff8d60c0287cc12fda56f9642
Change-Id: I76400e00ead54d9fc3d0dae26c2468e8401f3de8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286601
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-04-19 01:37:48 +00:00
Brian Quinlan
db491eb671 Set minimum mac SDK version to 10.14
Bug: https://github.com/dart-lang/sdk/issues/47820
Change-Id: I42310999303d1849aaedd800e4222e6863870fc5
Tested: Build-only change - tested with flutter engine build
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295389
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-04-18 19:55:03 +00:00
Alexander Aprelev
bd9c7a46e2 Roll zlib to 14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f
Bug: https://github.com/flutter/flutter/issues/124971
Change-Id: Ie4abdff9d3b32ba34a7b811080675e0e62905cf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-17 16:32:20 +00:00
Ryan Macnak
4b5d2087a8 [build] Honor build.py --toolchain for ia32 and x64 like the other architectures.
TEST=local build with custom toolchain
Change-Id: I7b9563da54afae0b3057d596d80a778c8db523a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294428
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-12 02:27:38 +00:00
Ryan Macnak
2cc96bfa0b [vm] Add an ABI for Fuchsia RISC-V.
https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0211_fuchsia_on_risc-v

TEST=./tools/build.py -mrelease -asimriscv64 gen_snapshot_fuchsia gen_snapshot_product_fuchsia
CoreLibraryReviewExempt: VM-only
Change-Id: Ie62addda6c15a5b44e814c49b543319aef4fc5e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281869
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-20 20:46:27 +00:00
Jackson Gardner
b890ed4cc3 Reland x3 [dart2wasm] Include wasm-opt in the shipped dart-sdk.
Hide this behind a flag, so that we can disable it when building in the flutter in-tree build.

The flag will be set to false for the in-tree flutter build, see
https://github.com/flutter/engine/pull/40195

Change-Id: I248376985d05bfb248a2eab6fa377cbb01d75654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288040
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-03-10 18:34:10 +00:00
lauren n. liberda
d9e8662145 fix //build/config/linux/pkg_config.gni
Closes https://github.com/dart-lang/sdk/pull/51614

GitOrigin-RevId: eeb9417653fcdda384bd26de58b3cf2b508be348
Change-Id: I0b9d3b06afdad29667281403e646edc4a06a2b0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286603
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-03-09 11:44:44 +00:00
Ryan Macnak
5c76d099a6 [build] Use relative paths.
go/remotely-cacheable

TEST=ci
Change-Id: Idee4ab56de2df15e90c5e4106b6200bf82e76155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287320
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-08 22:10:42 +00:00
Ryan Macnak
e31c3713bf Reland "[build, vm] Access TLS with less code."
- Avoid TLS initialization checks by using inline initialization.
 - Avoid global offset table indirection by reducing -fPIC to -fPIE.

out/ReleaseXARM64/exe.stripped/dart_precompiled_runtime
11137992 -> 11274776 (-1.21%)

We still need -fPIC in some places because we build a few shared libraries for FFI, so copy some of Fuchsia's GN setup to use -fPIE or -fPIC as appropriate.

Account for older gcc that does not default to -fpie.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/51602
Change-Id: I85072153cb1aef9047c1adbf36c7496fbeb11e10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286221
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-02 23:07:16 +00:00
Derek Xu
eb5c027d26 Add the /Zc:__cplusplus option to MSVC builds
TEST=Perfetto checks the __plusplus macro and reports an error when it
thinks a version prior to C++17 is being used. Perfetto was erroneously
reporting this error during the MSVC tryjob because we weren't setting
/Zc:__cplusplus. This change fixes the issue. See
https://ci.chromium.org/ui/p/dart/builders/try/vm-kernel-msvc-windows-try/146/overview

Change-Id: I6db00bec20936c0b1743bcb6e21b2c8f829097d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286220
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-03-02 19:50:33 +00:00
William Hesse
ec53fdd0bf Revert "[build, vm] Access TLS with less code."
This reverts commit aa79cf2708.

Reason for revert: -fPIC is needed in more places than the CL adds it to, see CI builds at https://ci.chromium.org/ui/p/dart-internal/builders/ci/dart-sdk-linux-riscv64-dev/405/overview

Original change's description:
> [build, vm] Access TLS with less code.
>
> - Avoid TLS initialization checks by using inline initialization.
> - Avoid global offset table indirection by reducing -fPIC to -fPIE.
>
> out/ReleaseXARM64/exe.stripped/dart_precompiled_runtime
> 11137992 -> 11274776 (-1.21%)
>
> We still need -fPIC in some places because we build a few shared libraries for FFI, so copy some of Fuchsia's GN setup to use -fPIE or -fPIC as appropriate.
>
> TEST=ci
> Change-Id: I6402fce3366a9c4b2741ffb4811562292b8ecb71
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285704
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Daco Harkes <dacoharkes@google.com>

Change-Id: Idacb7869e9fa9ad0f7ed7b0caa2bae19deece7d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286144
Reviewed-by: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: William Hesse <whesse@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-03-01 12:19:07 +00:00
Ryan Macnak
aa79cf2708 [build, vm] Access TLS with less code.
- Avoid TLS initialization checks by using inline initialization.
- Avoid global offset table indirection by reducing -fPIC to -fPIE.

out/ReleaseXARM64/exe.stripped/dart_precompiled_runtime
11137992 -> 11274776 (-1.21%)

We still need -fPIC in some places because we build a few shared libraries for FFI, so copy some of Fuchsia's GN setup to use -fPIE or -fPIC as appropriate.

TEST=ci
Change-Id: I6402fce3366a9c4b2741ffb4811562292b8ecb71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285704
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-03-01 01:21:55 +00:00
Jackson Gardner
e3661b7d2f Revert "Reland "Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk."""
This reverts commit faecf41be1.

Reason for revert: Flutter HHH bots are broken: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8788949281966049297/+/u/build_host_debug/stdout

Original change's description:
> Reland "Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk.""
>
> This is a reland of commit b19091385a
>
> Fixed the calculation of the paths of binaryen source files so that they
> work properly when building as a dependency (inside the flutter engine
> repo).
>
> Original change's description:
> > Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk."
> >
> > This is a reland of commit 6271d26baf
> >
> > The change broke the gcc riscv64 builders, due to a `unused-variable`
> > warning coming from binaryen sources. That warning has now been
> > disabled for binaryen targets.
> >
> > Original change's description:
> > > [dart2wasm] Include wasm-opt in the shipped dart-sdk.
> > >
> > > Change-Id: Ib224f0b92fa28019ad3cf67d7ba2bef5c31b92ef
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280840
> > > Reviewed-by: Martin Kustermann <kustermann@google.com>
> > > Commit-Queue: Jackson Gardner <jacksongardner@google.com>
> > > Reviewed-by: Aske Simon Christensen <askesc@google.com>
> >
> > Change-Id: I76bf4ad5d1f6a8116631df4b91cbc5a52cac4f31
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283240
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
> > Commit-Queue: Jackson Gardner <jacksongardner@google.com>
>
> Change-Id: I5cc269daebc5e2068c084bb72b2bd7cb58ba6fbe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283721
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Jackson Gardner <jacksongardner@google.com>

TBR=kustermann@google.com,askesc@google.com,joshualitt@google.com,jacksongardner@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: If4e864b3dfb5d9ff840846bff0690247256b2762
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283745
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-02-17 09:04:50 +00:00
Jackson Gardner
faecf41be1 Reland "Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk.""
This is a reland of commit b19091385a

Fixed the calculation of the paths of binaryen source files so that they
work properly when building as a dependency (inside the flutter engine
repo).

Original change's description:
> Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk."
>
> This is a reland of commit 6271d26baf
>
> The change broke the gcc riscv64 builders, due to a `unused-variable`
> warning coming from binaryen sources. That warning has now been
> disabled for binaryen targets.
>
> Original change's description:
> > [dart2wasm] Include wasm-opt in the shipped dart-sdk.
> >
> > Change-Id: Ib224f0b92fa28019ad3cf67d7ba2bef5c31b92ef
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280840
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
> > Commit-Queue: Jackson Gardner <jacksongardner@google.com>
> > Reviewed-by: Aske Simon Christensen <askesc@google.com>
>
> Change-Id: I76bf4ad5d1f6a8116631df4b91cbc5a52cac4f31
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283240
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Jackson Gardner <jacksongardner@google.com>

Change-Id: I5cc269daebc5e2068c084bb72b2bd7cb58ba6fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283721
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2023-02-16 22:10:18 +00:00
Daco Harkes
97d085c84b Revert "Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk.""
This reverts commit b19091385a.

Reason for revert: This breaks the Flutter build.
'../../third_party/dart/third_party/dart/third_party/binaryen/src/src/ir/memory-utils.cpp', needed by 'obj/third_party/dart/third_party/dart/third_party/binaryen/src/src/ir/binaryen_sources.memory-utils.o', missing and no known rule to make it

Original change's description:
> Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk."
>
> This is a reland of commit 6271d26baf
>
> The change broke the gcc riscv64 builders, due to a `unused-variable`
> warning coming from binaryen sources. That warning has now been
> disabled for binaryen targets.
>
> Original change's description:
> > [dart2wasm] Include wasm-opt in the shipped dart-sdk.
> >
> > Change-Id: Ib224f0b92fa28019ad3cf67d7ba2bef5c31b92ef
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280840
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
> > Commit-Queue: Jackson Gardner <jacksongardner@google.com>
> > Reviewed-by: Aske Simon Christensen <askesc@google.com>
>
> Change-Id: I76bf4ad5d1f6a8116631df4b91cbc5a52cac4f31
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283240
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Jackson Gardner <jacksongardner@google.com>

TBR=kustermann@google.com,askesc@google.com,joshualitt@google.com,jacksongardner@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Iee8e909d701d22abac00d199dee7591bf9bf5f7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283560
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-02-16 09:07:35 +00:00
Jackson Gardner
b19091385a Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk."
This is a reland of commit 6271d26baf

The change broke the gcc riscv64 builders, due to a `unused-variable`
warning coming from binaryen sources. That warning has now been
disabled for binaryen targets.

Original change's description:
> [dart2wasm] Include wasm-opt in the shipped dart-sdk.
>
> Change-Id: Ib224f0b92fa28019ad3cf67d7ba2bef5c31b92ef
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280840
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>

Change-Id: I76bf4ad5d1f6a8116631df4b91cbc5a52cac4f31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283240
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2023-02-15 19:09:07 +00:00
なつき
ea1c4e23e5 [build] Statically link libstd++ and libgcc when using clang.
Closes https://github.com/dart-lang/sdk/pull/51400

GitOrigin-RevId: 253848462793f28071b9ef35aab08291986d01f1
Change-Id: Ideb64cb97bd7e49fe696439fb7b8e62098891668
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282961
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-02-14 19:25:30 +00:00
Ryan Macnak
8a95be8cda [build] Statically link libstd++ and libgcc when using gcc.
This brings the gcc build into agreement with the clang build.

It also avoids dpkg-shlibdeps picking up strange cross-dependencies when building a .deb for RISC-V.

TEST=ldd dart
Change-Id: I1dc70e6786681975a7897cefbb0db3a80ffc8ed5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282820
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-02-13 23:04:58 +00:00
Ryan Macnak
384394b4a3 Roll Fuchsia SDK to 7b3b23b2c0da59b3aceab6c49fbe7d9ed34d7382.
Avoid sharing manifests between components, which confuses `fuchsia_component`.

Change-Id: I2a035e6257284a9e8ff5da18f7c2e212e0a9091f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282120
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-02-09 22:43:36 +00:00
William Hesse
a9fe60b1f9 Revert "[dart2wasm] Include wasm-opt in the shipped dart-sdk."
This reverts commit 6271d26baf.

Reason for revert: The build is broken on linux-riscv64 with this change.

Original change's description:
> [dart2wasm] Include wasm-opt in the shipped dart-sdk.
>
> Change-Id: Ib224f0b92fa28019ad3cf67d7ba2bef5c31b92ef
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280840
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>

TBR=kustermann@google.com,askesc@google.com,joshualitt@google.com,jacksongardner@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I520d9be6d43b55551694a58a22c0ae8ae3e7344f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281802
Commit-Queue: William Hesse <whesse@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-02-08 19:24:46 +00:00
Jackson Gardner
6271d26baf [dart2wasm] Include wasm-opt in the shipped dart-sdk.
Change-Id: Ib224f0b92fa28019ad3cf67d7ba2bef5c31b92ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280840
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-02-08 18:51:48 +00:00
Liam Appelbe
9ad59be793 Revert "Suppress sign-compare warnings for musl libc"
This reverts commit 9fefe1054e.

Reason for revert: Breaks the riscv64 bot: https://logs.chromium.org/logs/dart-internal/buildbucket/cr-buildbucket/8790248947000585777/+/u/build_dart/stdout

Original change's description:
> Suppress sign-compare warnings for musl libc
>
> Closes https://github.com/dart-lang/sdk/pull/51225
>
> GitOrigin-RevId: 0c2d3d4b79a461d1af2127061b3857f08c22856d
> Change-Id: I9e58cccfdf65604baf0789c2a4294dfb50590e95
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280252
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

TBR=vegorov@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com,copybara-worker-blackhole@google.com

Change-Id: I05c64d556b7bd6f4099f8468a94557d9a51e5260
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280480
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-02-02 20:28:46 +00:00
なつき
9fefe1054e Suppress sign-compare warnings for musl libc
Closes https://github.com/dart-lang/sdk/pull/51225

GitOrigin-RevId: 0c2d3d4b79a461d1af2127061b3857f08c22856d
Change-Id: I9e58cccfdf65604baf0789c2a4294dfb50590e95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280252
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-02-02 09:07:58 +00:00