Commit graph

273 commits

Author SHA1 Message Date
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
Ryan Macnak 1f7ac27eec Revert "Suppress clang warning for musl libc inline"
This reverts commit ddc19f7f92.

Reason for revert: Breaks gcc build
../../runtime/bin/socket_base_posix.cc:161: error: ignoring #pragma clang diagnostic [-Werror=unknown-pragmas]
  161 |     cmsg = CMSG_NEXTHDR(&msg, cmsg);
      |
cc1plus: all warnings being treated as errors

Original change's description:
> Suppress clang warning for musl libc inline
>
> Closes https://github.com/dart-lang/sdk/pull/51191
>
> GitOrigin-RevId: d7064c43adce0b115c79e818800e44ba4f60739e
> Change-Id: Ie73e96c83294d43baf3be6772cb84705ba2d2712
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280136
> 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: I8b726d616ba1b5434b92c239c3b8897a942fad5b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280300
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-02-01 23:25:47 +00:00
なつき ddc19f7f92 Suppress clang warning for musl libc inline
Closes https://github.com/dart-lang/sdk/pull/51191

GitOrigin-RevId: d7064c43adce0b115c79e818800e44ba4f60739e
Change-Id: Ie73e96c83294d43baf3be6772cb84705ba2d2712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280136
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-02-01 21:58:18 +00:00
Derek Xu 6f09cf9094 [VM] Add dependencies needed to generate protozero code
This adds dependencies on the perfetto, protobuf, and protobuf-gn repos on fuchsia.googlesource.com.

Change-Id: Ib196587e4cacb7e95c5ca284539fcd578d09d16b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278200
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-01-26 16:07:22 +00:00
Ryan Macnak 1aa7f17b56 [build] Default to -O2 instead of -O3.
This moderately reduces code size without large regressions on Golem. Going further to -Os still produces noticeable regressions.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38647
Change-Id: I8409908ca37d4a2b18cb989d9748e35a15072df6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217504
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-01-24 00:54:29 +00:00
Josh Soref ba15a61271 Spelling build
Closes https://github.com/dart-lang/sdk/pull/50859

GitOrigin-RevId: 7b056018c2925745701bdecdd7da325d9458204d
Change-Id: Iff037d773713bf73efde6951599becfd7297b921
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277740
Reviewed-by: Alexander Thomas <athom@google.com>
2023-01-23 08:56:14 +00:00
なつき afe9219026 [infra] Support for Alpine Linux Sysroot
Closes https://github.com/dart-lang/sdk/pull/51044

TEST=manually tested by the contributor

GitOrigin-RevId: 86c85da0680047e08caf81cc4c12098ae85c0d2b
Change-Id: I591d7e17ce3a87cf8ce8380c9511f70d738d44c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279267
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-01-19 10:36:51 +00:00
Ryan Macnak ef3e0a45a8 Roll Clang from 026df9514ead to ca6196138012.
Fix new -Werror=unused-command-line-argument for -stdlib=libc++.

Change-Id: I7e6056323b7bb6da49b80299380be6ed7b70c582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278691
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-01-10 17:20:04 +00:00
Jackson Gardner 061a9fbefb [dart2wasm] Add --enable-asserts flag.
Change-Id: I4cc9a55673374926e8b19cccf2be9888f166553d
Bug: https://github.com/dart-lang/sdk/issues/50801
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276772
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-12-21 19:53:14 +00:00
Martin Kustermann 70656411b1 [vm] Avoid using -fno-exceptions globally in GN builds.
Right now `-fno-exception` will be in `cflags` for every executable.
That prevents adding & building 3rd party `DEPS` that may use
exceptions.

So we'll remove `-fno-exceptions` from global configurations and rely on
the fact that the `dart_config` GN config already has `-fno-exceptions`
in it's `cflags`.

TEST=ci

Change-Id: I8be9d7341a9c88f29cdf6dfbf32db70c7f78a9bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270403
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-11-18 09:42:48 +00:00
Joshua Litt 1ed2a07022 [dart2wasm] Build product snapshot when building for the SDK.
The `dartaotruntime` is built in `product` mode even when we do a release build. This CL wires up a product flag so we always build the Dart2Wasm product snapshot when creating the SDK.

Change-Id: Ic8c6a6da180a47a19ba818d7c449f712c9e60123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264887
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2022-10-26 17:04:17 +00:00
Tess Strickland 9df6656aa9 [build] Re-add linker flags to create empty section in AOT runtime.
To avoid these flags being applied to unexpected build rules, we
separate them out into a separate config that is then pulled in
explicitly in the `dart_precompiled_runtime{,_product}` executable
rules. Only those two executables need the additional empty section:
the product version because it becomes `dartaotruntime` in the SDK
bundle, and the non-product version because some of our tests build
standalone executables using it.

The linker flags were originally removed due to
https://github.com/flutter/flutter/issues/112687.
With the recent removal of bitcode support from Flutter (see
https://github.com/flutter/flutter/issues/107883), I can build
the `ios_release` target locally without any issue.

This also reverts the clang DEPS changes from CL 256208 (again).

TEST=pkg/dartdev/test/commands/compile_test

Bug: https://github.com/dart-lang/sdk/issues/49783
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: Ie46402ec2eeda23109247eb9d7a64935ec2052cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262429
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-10-07 09:26:18 +00:00
Tess Strickland fef905cbe2 [build] Remove linker flags to create empty section in AOT runtime.
These linker flags are causing issues with the Dart->Flutter roll,
and so I'm removing them for now until we can figure out how to
reintroduce them later.

To avoid overwriting section contents, even at a much reduced
amount, I also reland the clang DEPS revert in CL 256208.

TEST=pkg/dartdev/test/commands/compile_test

Bug: https://github.com/flutter/flutter/issues/112687
Change-Id: I35d3ff6a2a0a46e2f589469fb47bca5f9ca6df1d
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262161
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-09-30 12:48:59 +00:00