Commit graph

310 commits

Author SHA1 Message Date
Alexander Thomas e89fadaf00 [build] Remove obsolete windows build files
Cq-Include-Trybots: luci.dart.try:dart-sdk-win-try,vm-kernel-msvc-windows-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try
Fixes: https://github.com/dart-lang/.allstar/issues/159
Change-Id: I0079b5d79a5d3121c6af1fc002ab062d2baf18b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245089
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2022-05-18 13:34:36 +00:00
Ryan Macnak 3c01efcbb0 Reland "[build] Fix Android build for ARM64 Mac."
Account for simarm_x64 in TargetCpuForArch.

TEST=local
Bug: https://github.com/dart-lang/sdk/issues/48792
Change-Id: I820cb49ee8925c50196cb2472266f9e248c9089d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243642
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-05-10 16:11:53 +00:00
Clement Skau 81f6cc144e [infra] Error, don't crash setup_toolchain.py
In case the environment is incorrectly set on Windows (e.g.
GYP_MSVS_OVERRIDE_PATH pointing to a non-existing path), the
setup_toolchain.py script may raise an exception.

The script attempts to run a subprocess to gather the environment
variables. But it does not check that the process actually
succeeded.
In case the process fails the environment data will be invalid and
the script will ultimately raise an exception.

This change adds a check for the process failing, and gracefully
warns and exits the script instead.

TEST=Manual build on Windows.
Change-Id: I3624bdf98e0ebe48b403825a90ce2e86c2ed8008
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242860
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2022-05-02 13:53:00 +00:00
Ryan Macnak c1ef5795e1 [infra] Give VM engineers OWNERS over tools/gn.py et al.
These files frequently require changes when GN files are changed.

Change-Id: Ie0e7197ecd80081811608e05e58dfc0cf2036c03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242063
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-25 17:47:23 +00:00
Ryan Macnak 5f1bda06ee Revert "[build] Fix Android build for ARM64 Mac."
This reverts commit b50396740f.

Reason for revert: vm-kernel-precomp-linux-debug-simarm_x64

Original change's description:
> [build] Fix Android build for ARM64 Mac.
>
> TEST=local
> Bug: https://github.com/dart-lang/sdk/issues/48792
> Change-Id: Ia43dd46f90ef5f592e324bb889c20c221f69998a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241102
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=whesse@google.com,rmacnak@google.com,dacoharkes@google.com

Change-Id: I0cfdb5653dff7675afdb005df0c37f7560b26ee3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/48792
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-20 23:13:29 +00:00
Ryan Macnak 8778e322cc [build] Toolchain setup for ARM64 Windows.
Bug: https://github.com/dart-lang/sdk/issues/47824
Change-Id: I75fa3be1ea66d7f9c5fbafc8cd05640324531cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239542
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-20 17:21:58 +00:00
Ryan Macnak b50396740f [build] Fix Android build for ARM64 Mac.
TEST=local
Bug: https://github.com/dart-lang/sdk/issues/48792
Change-Id: Ia43dd46f90ef5f592e324bb889c20c221f69998a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241102
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-20 17:15:48 +00:00
なつき c50940b56b Fallback to uname for detecting ARM CPU architecture
Currently running official dart `linux/arm/v7` container image on x86_64 with QEMU results in `Unrecognized ARM CPU architecture`.

This is due to QEMU reporting host `/proc/cpuinfo` instead of the emulated architecture.

Checking `uname` in addition to `/proc/cpuinfo` would make `linux/arm/v7` build work consistently regardless of whether `--use-qemu` is supplied during SDK build time.

TEST=running the qemu bot
TEST=ran the ffi/hardfp_test.dart locally both in AOT and JIT mode.

Closes https://github.com/dart-lang/sdk/pull/48665
https://github.com/dart-lang/sdk/pull/48665

GitOrigin-RevId: d1414d747152d048f3ecaadfd0cd3356ce7a2205
Change-Id: If8b42a700d55e83fea0ee0035848308a3211ec43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238841
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-04-13 07:54:02 +00:00
Ryan Macnak 50c5b075ec [build] Fix building on an ARM64 Linux host.
Change-Id: I42a8265722083fb02f815c635c44f63f809a9082
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237923
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-03-22 00:50:18 +00:00
Daco Harkes a40f7d2a42 [vm] Support -d0 on windows with clang
`python3 tools\build.py -ax64 -d0 --clang runtime`

While MSVC expects `/O0`, clang-cl expects `-d0` instead.

However, clang-cl still wants /O2.

Change-Id: I7fa2f480cc9c110c7cd9c86072b5105106fbe76a
Cq-Include-Trybots: luci.dart.try:dart-sdk-win-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236882
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-03-14 11:23:48 +00:00
Alexander Thomas b5fb9c7bca [infra] Fix OWNERS files
* Remove leftover files from chromium.
* Fix syntax errors in some files.

Bug: b/216440912
Change-Id: Ibe9dc23b88d0def993bd1217df6089c1112b4ad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235082
Reviewed-by: William Hesse <whesse@google.com>
2022-03-03 09:56:33 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Ryan Macnak 04ba20aa98 [vm] Support RISC-V.
Implements a backend targeting RV32GC and RV64GC, based on Linux standardizing around GC. The assembler is written to make it easy to disable usage of C, but because the sizes of some instruction sequences are compile-time constants, an additional build configuration would need to be defined to make use of it.

The assembler and disassembler cover every RV32/64GC instruction. The simulator covers all instructions except accessing CSRs and the floating point state accessible through such, include accrued exceptions and dynamic rounding mode.

Quirks:
  - RISC-V is a compare-and-branch architecture, but some existing "architecture-independent" parts of the Dart compiler assume a condition code architecture. To avoid rewriting these parts, we use a peephole in the assembler to map to compare-and-branch. See Assembler::BranchIf. Luckily nothing depended on taking multiple branches on the same condition code set.
  - There are no hardware overflow checks, so we must use Hacker's Delight style software checks. Often these are very cheap: if the sign of one operand is known, a single branch is needed.
  - The ranges of RISC-V branches and jumps are such that we use 3 levels of generation for forward branches, instead of the 2 levels of near and far branches used on ARM[64]. Nearly all code is handled by the first two levels with 20-bits of range, with enormous regex matchers triggering the third level that uses aupic+jalr to get 32-bits of range.
  - For PC-relative calls in AOT, we always generate auipc+jalr pairs with 32-bits of range, so we never generate trampolines.
  - Only a subset of registers are available in some compressed instructions, so we assign the most popular uses to these registers. In particular, THR, TMP[2], CODE and PP. This has the effect of assigning CODE and PP to volatile registers in the C calling convention, whereas they are assigned preserved registers on the other architectures. As on ARM64, PP is untagged; this is so short indices can be accessed with a compressed instruction.
  - There are no push or pop instructions, so combining pushes and pops is preferred so we can update SP once.
  - The C calling convention has a strongly aligned stack, but unlike on ARM64 we don't need to use an alternate stack pointer. The author ensured language was added to the RISC-V psABI making the OS responsible for realigning the stack pointer for signal handlers, allowing Dart to leave the stack pointer misaligned from the C calling convention's point of view until a foreign call.
  - We don't bother with the link register tracking done on ARM[64]. Instead we make use of an alternate link register to avoid inline spilling in the write barrier.

Unimplemented:
 - non-trivial FFI cases
 - Compressed pointers - No intention to implement.
 - Unboxed SIMD - We might make use of the V extension registers when the V extension is ratified.
 - BigInt intrinsics

TEST=existing tests for IL level, new tests for assembler/disassembler/simulator
Bug: https://github.com/dart-lang/sdk/issues/38587
Bug: https://github.com/dart-lang/sdk/issues/48164
Change-Id: I991d1df4be5bf55efec5371b767b332d37dfa3e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217289
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-20 00:57:57 +00:00
Alexander Thomas 4ff053b8b7 [infra] Support macOS SDKs > 11
Inspired by https://crrev.com/cdd96213435c7cb21042e84720d9343ca35b37cf

Cq-Include-Trybots: luci.dart.try:dart-sdk-mac-try,vm-kernel-mac-release-x64-try,vm-kernel-mac-release-arm64-try
Change-Id: I209b279ca2066c8597170f552e9a5e98a4daf1b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219790
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-11-10 13:46:34 +00:00
Tess Strickland 14bcf0f3d4 [build] Make app snapshot build failures copy/pastable.
* Use a filename without spaces for the non-existent DFE path.

* Convert a relative path to the executable to an absolute one in
  gn_run_binary so the command can be run outside the build directory
  without editing.

Change-Id: I31421acb54ad940115d4e000c4ec31605a33b5cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216800
Reviewed-by: Alexander Thomas <athom@google.com>
2021-10-14 11:51:32 +00:00
Ryan Macnak b4b7b8f116 [build] Add support for building for Fuchsia from Mac.
TEST=./tools/build.py --os=fuchsia --mode=all runtime create_sdk
Change-Id: I6b15d1cc174b84d900d526730e5f58d64d2596cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-10-13 21:14:56 +00:00
Nate Bosch f9c68a5679 Replace a bunch of references to .packages
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.

TEST=None, the change should have no visible impact.

Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-10-12 20:16:15 +00:00
Ryan Macnak 1d70168786 [build] Fix arm and arm64 gcc builds.
TEST=./tools/build.py --no-goma --no-clang --arch=arm,arm64 runtime
Bug: https://github.com/dart-lang/sdk/issues/47330
Change-Id: I32cea56e3ad64200a7057cc6a381bc6d9656ec7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215984
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-10-12 18:49:52 +00:00
Alexander Aprelev 7c5b019fdf [build] Fix zero-build of few common targets on Windows.
Fixes https://github.com/dart-lang/sdk/issues/47392

TEST=zero-build on windows

Change-Id: I2b37b48b7acc8c5139e989159250c361317e4ea5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215940
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-10-07 16:23:42 +00:00
Ryan Macnak 41e45e7a1c [build] Detect the host architecture of an ARM64 Mac as ARM64 even through Rosetta.
Lets AppJIT training happen directly, instead of the absurdity of arm64 (hardware) running x64 (Rosetta) running arm64 (VM's simulator).

Change-Id: Idbf82530d946099db80c550070257c4c6ead31e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214763
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-09-28 17:44:32 +00:00
Tamir Duberstein 38bc52cd0e Remove fuchsia.net.NameLookup
This protocol is replaced with fuchsia.net.name.Lookup.

Change-Id: Ib87ba5c4ca243c044d1ef43f401387bad7126b79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212100
Auto-Submit: Tamir Duberstein <tamird@google.com>
Reviewed-by: Chase Latta <chaselatta@google.com>
Commit-Queue: Chase Latta <chaselatta@google.com>
2021-09-01 17:28:07 +00:00
Zach Anderson 2cae568e38 [gn] Forward the 'pool' parameter through dart actions
Related: https://github.com/flutter/flutter/issues/86946

Change-Id: Ie33c93a76d6107760655a7769c6541222e169c75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208060
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-07-26 15:20:46 +00:00
Tamir Duberstein be212c94ae Add fuchsia.net.name.Lookup
fuchsia.net.NameLookup is transitioning to fuchsia.net.name.Lookup.

@zanderso

Closes https://github.com/dart-lang/sdk/pull/46667
https://github.com/dart-lang/sdk/pull/46667

GitOrigin-RevId: a45a125ea0a96c66d5a643ee2a34c3e26287eb9a
Change-Id: Idbc44a97f42deedcf306490c391769433b3720a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207561
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Darren Chan <chandarren@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-07-21 02:32:19 +00:00
Ryan Macnak 1acc926edd [build] Increase linker optimization level to match Flutter and Fuchsia.
Reduces VM code size by about 15k.

Change-Id: Icaa1a5278855f88f7ce702802d6aaa62639cfac5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205120
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-28 18:55:11 +00:00
Tess Strickland 40a53e2a2a [build] Fix paths to clang shared libraries on Fuchsia.
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try,vm-kernel-win-release-x64-try
Change-Id: I94d65dbc239ce154db840638410d444d9f9bf50e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204584
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-06-23 10:23:05 +00:00
Tess Strickland 3c7075baca Reland "[build] Use Fuchsia windows clang toolchain"
This reverts commit fc9383ed41.

Reason for revert: After discussion with athom, the breakage is a known temporary situation.

Original change's description:
> Revert "[build] Use Fuchsia windows clang toolchain"
>
> This reverts commit e479049467.
>
> Reason for revert: Broke build on vm-fuchsia-release-x64.
>
> Original change's description:
> > [build] Use Fuchsia windows clang toolchain
> >
> > Change-Id: Ie04039c736f40174cc45a61aa637a88fa53d9024
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201862
> > Reviewed-by: Alexander Thomas <athom@google.com>
>
> TBR=aam@google.com,athom@google.com
>
> Change-Id: I3f1ce2c30bf0600b025bc95a051e569660e140c0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204582
> Reviewed-by: Tess Strickland <sstrickl@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: I0efe29d2dc11a2f3e65d65d2f2eaecc4c827490a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204583
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-06-23 08:50:47 +00:00
Tess Strickland fc9383ed41 Revert "[build] Use Fuchsia windows clang toolchain"
This reverts commit e479049467.

Reason for revert: Broke build on vm-fuchsia-release-x64.

Original change's description:
> [build] Use Fuchsia windows clang toolchain
>
> Change-Id: Ie04039c736f40174cc45a61aa637a88fa53d9024
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201862
> Reviewed-by: Alexander Thomas <athom@google.com>

TBR=aam@google.com,athom@google.com

Change-Id: I3f1ce2c30bf0600b025bc95a051e569660e140c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204582
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-06-23 08:45:04 +00:00
Alexander Aprelev e479049467 [build] Use Fuchsia windows clang toolchain
Change-Id: Ie04039c736f40174cc45a61aa637a88fa53d9024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201862
Reviewed-by: Alexander Thomas <athom@google.com>
2021-06-23 07:33:56 +00:00
Ryan Macnak 7def42c489 Reland "[infra] Update to a clang with libc++.a for Mac ARM64."
Adjust Android build.

Bug: https://github.com/dart-lang/sdk/issues/42773
Bug: https://github.com/flutter/flutter/issues/75348
Change-Id: Iae98c03e8e155793648825b3155572412303434b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200903
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-05-24 21:31:20 +00:00
Vyacheslav Egorov f364c8bf7b [infra] Fix vs_toolchain.py
Pass shell=True when invoking python, without
this flag Windows own python.exe is selected
even though it is shadowed in the PATH by
depot_tools' python.bat.

Change-Id: Ia581853ff5819f97f872761ff7557ba9d6028beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200875
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-05-21 11:04:22 +00:00
Clement Skau 67f097a161 [tools] Update all iteritems -> items
This migrates old python2 dict.iteritems() to python3 dict.items().
iteritems was removed in python3 meaning these script will otherwise not
run.
Note that this remains backwards compatible since dict.items() also
existed in python2, though the implementation was more memory intensive
for large dicts (which these likely aren't).

This is similar to https://dart-review.googlesource.com/c/sdk/+/200184

Change-Id: I4fe5c90d21de97d0ecceb27fa6efa7d7deb14098
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200864
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-05-20 11:36:52 +00:00
Lasse Reichstein Holst Nielsen 28c784d87b Fix gn helper script to create *valid* strings for settings containing backslashes.
The current script stores some environment variable values as GN declarations.
It replaces `"` inside the value with `\"` because it creates a `"`-delimited
string, but it doesn't replace `\` with `\\` as it rightly should to preserve
the meaning of the original string.
That affects **Windows paths**. If your path ends in `\`, the created "string literal"
will end (or rather, not end) with `\"` and not be valid.
Similarly if it contains `\"` originally, it will become `\\"` and end the string
early.

It's easy to have a path ending in something like `C:\something\something\`,
and you can't compile Dart if you have that.

Change-Id: Iaa3cdf0c8113fe2f09e7eb3ac7435bf770d8b478
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200641
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-05-19 12:35:16 +00:00
Jeffrey Swan fed6cadf77 fix(docs): corrects common typos in project documentation
Scope of changes is restricted to markdown docs only. Changes made in agreement with Standard American English.

Closes https://github.com/dart-lang/sdk/pull/45818
https://github.com/dart-lang/sdk/pull/45818

TEST=Manual review of the changed markdown files.

GitOrigin-RevId: 6df9128b46e4e51e634baf534c0169f62bc6a67e
Change-Id: I7b67dcb5a6e0a03db2b6eea24ace8dee207c4a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196742
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-05-18 15:48:18 +00:00
Alexander Thomas 6a7aaf5bc3 [build] Raise minimum mac SDK version to 10.13 to reduce build warnings
This removes warnings like these:
```
 ld: warning: object file (../../buildtools/mac-x64/clang/bin/../lib/libc++.a(memory.cpp.o)) was built for newer OSX version (10.13) than being linked (10.8)
```

These warnings seem to be harmless but may indicate that our builds are
no longer working below macOS 10.13. On developer machines, these
warnings don't seem to occur. We don't test on versions older than 10.13
so we can't guarantee that the Dart SDK works on those.

https://github.com/dart-lang/sdk/issues/40850

Change-Id: I1b146803605daa9e42d4283722efb39ecd66f0ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146803
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-04-27 10:37:30 +00:00
Alexander Thomas 30127ac12d [build] Convert output bytes to UTF-8 in gn_run_binary
The encoding parameter was not available on older versions of python.

Change-Id: I5ba56286d1ec1ac616daaac6006f5e9b0167d01d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195680
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-16 18:03:06 +00:00
Alexander Thomas d26ede6f24 [build] Force output encoding to UTF-8 in gn_run_binary
This makes it work when the environment uses ASCII.

Change-Id: Iffb3b3ff4da9fc06ed894a97f8aae4c1dc228e06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195516
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-16 13:54:11 +00:00
Alexander Thomas b5c63ce757 [infra] Migrate scripts to python3
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.

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

TEST=Manually tested common user journeys.

Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-15 10:10:20 +00:00
Tess Strickland 6d1ea68cc9 [build] Move from the C++11 to the C++17 standard.
Also includes some example changes using C++14/C++17 features.

TEST=vm/cc/BitField_Assert

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,dart-sdk-win-try,vm-kernel-win-release-x64-try,vm-kernel-win-release-ia32-try,dart-sdk-mac-try,vm-kernel-mac-release-x64-try
Change-Id: Icf5c5267431daf9cea2e61b67131021557675f3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192183
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-03-19 15:29:57 +00:00
Alexander Aprelev 8e7c8c9d8b Roll icu dependency to 81d656878ec611cb0b42d52c82e9dae93920d9ba.
Last roll was from 6/18/2020.
Allows to enable "implicit-int-float-conversion" warning in the dart codebase.

Change-Id: Ida1a3a477e5bc45993dc10e0c3db410265a005ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191300
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-03-15 23:50:04 +00:00
Ryan Macnak e30e0cd410 [build] Setup cross-build for ARM64 Mac; still doesn't link.
Bug: https://github.com/dart-lang/sdk/issues/42773
Change-Id: I7f5715952461ea87310dacb8aa37c66692b1aacc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184060
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-02-09 23:59:18 +00:00
Alexander Aprelev 36e10faa3b [build] Add stub for third_party/android_tools for updated zlib.
This copies third_party/android_ndk/BUILD.gn to third_party/android_tools/BUILD.gn. Old version of zlib used to reference former, updated version - latter.

Follow-up to https://dart.googlesource.com/sdk/+/44d977b897e780e20383c37b85e7f284239c6803.

Change-Id: I2c2537d1db572788d83ccd09fa3b1c916202cbfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183060
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-02-05 03:53:42 +00:00
Alexander Aprelev 44d977b897 [build] Update zlib dependency.
This is needed to update clang dependency as there are errors being revealed in current zlib with updated clang.

Change-Id: I916be87dec5195f159ae002d3207788b3bf9bda7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183042
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-02-05 01:10:32 +00:00
Alexander Aprelev 68e77932b5 Revert "[build] Update clang and gn dependency so they match Fuchsia. Update zlib dependency too."
This reverts commit 0069bdb721 as it broke mac buildbots.

For example, https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-kernel-mac-release-x64/12746
```
[186/1896] LINK ./process_test

FAILED: process_test exe.stripped/process_test
/opt/s/w/ir/cache/goma/client/gomacc ../../buildtools/mac-x64/clang/bin/clang++ -isysroot sdk/xcode_links/MacOSX10.14.sdk -mmacosx-version-min=10.8  -fno-exceptions -arch x86_64 -stdlib=libc++ -nostdlib++ ../../buildtools/mac-x64/clang/bin/../lib/libc++.a -Wl,-dead_strip -Wl,-search_paths_first -L. -undefined dynamic_lookup -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/../../.. -Wl,-pie -Xlinker -rpath -Xlinker @executable_path/Frameworks -o ./process_test -Wl,-filelist,./process_test.rsp    && strip -x -o ./exe.stripped/process_test ./process_test
ld: unknown option: -platform_version
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
```
Change-Id: Idec3568ef2e855ed84a92d23dc8d85f5e790b9d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182963
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-02-04 22:33:29 +00:00
Alexander Aprelev 0069bdb721 [build] Update clang and gn dependency so they match Fuchsia. Update zlib dependency too.
zlib dependency had to be updated to pick up fixes for errors revealed with updated clang.

Change-Id: I30a65faf532782dcb595c26e21c81c521bd0d074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182667
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-02-04 22:11:09 +00:00
Vyacheslav Egorov 5548d11f4c Revert "[vm/build] Workaround for ld 2.19 crash on ARM"
This reverts commit e961aa565e.

Reason for revert: does not actually work

Original change's description:
> [vm/build] Workaround for ld 2.19 crash on ARM
>
> When producing ARM builds instruct llvm-objcopy to drop .ARM.exidx/extab
> sections. These sections don't contain any useful information (we don't use
> exceptions or unwind C++ frames and most of the dart binary is in fact not
> covered by them), however they have been seen to break dynamic linker in older
> glibc versions (pre 2.23) because .ARM.exidx ends up being positioned between
> .rel.dyn and .rel.plt sections while older versions of dynamic linker
> expect these two sections to appear one after another in the ELF file.
>
> Closes https://github.com/dart-lang/sdk/issues/41644.
>
> Change-Id: I0ceebb63105591f132f3764180ae041366cbcade
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175723
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,kustermann@google.com,rmacnak@google.com,alexmarkov@google.com

Change-Id: Ia797d8bb6e5dbc44bf68965320da1e03ece17052
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175727
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-12-11 21:49:11 +00:00
Vyacheslav Egorov e961aa565e [vm/build] Workaround for ld 2.19 crash on ARM
When producing ARM builds instruct llvm-objcopy to drop .ARM.exidx/extab
sections. These sections don't contain any useful information (we don't use
exceptions or unwind C++ frames and most of the dart binary is in fact not
covered by them), however they have been seen to break dynamic linker in older
glibc versions (pre 2.23) because .ARM.exidx ends up being positioned between
.rel.dyn and .rel.plt sections while older versions of dynamic linker
expect these two sections to appear one after another in the ELF file.

Closes https://github.com/dart-lang/sdk/issues/41644.

Change-Id: I0ceebb63105591f132f3764180ae041366cbcade
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175723
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-12-11 08:48:38 +00:00
Daco Harkes 4ccb45c172 [vm] Fuchsia arm64 build
Also runs the build on the existing Fuchsia bot and start building the
test .far on the bot.

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

TEST=tools/build.py --os=fuchsia -a arm64 create_sdk

Change-Id: I8ba92defb9318773552af7e178dea12460790004
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175482
Reviewed-by: Liam Appelbe <liama@google.com>
2020-12-10 12:15:17 +00:00
William Hesse a1d19ac096 Allow MacOSX SDK versions 10.x and 11.x in build scripts
Fixes: https://github.com/dart-lang/sdk/issues/43871
Change-Id: Ic86d65311c198c677caaa1c7fb51d779baa7a335
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168825
Reviewed-by: Alexander Thomas <athom@google.com>
2020-10-22 12:53:55 +00:00
Ryan Macnak 4182cbe1a3 Remove use of set_sources_assignment_filter
The sources assignment filter is considered a misfeature of gn
and is planned for removal (see discussion at [1]).

Convert dart BUILD.gn rules to manually filter the files that
are build using explicit `if` expressions. Remove obsolete call
to set_sources_assignment_filter() to filter '*_test.*' files
as no such files are present in the variables used to build the
`sources` value.

[1]: https://groups.google.com/a/chromium.org/g/gn-dev/c/oQcYStl_WkI/m/roukYTxSDAAJ

Bug: gn:125
Change-Id: I591fbb746cf694f7d2a5a330f81652380acf5c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166629
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-10-08 20:08:59 +00:00
Liam Appelbe 0e84aceb7e [wasm] Wrapper library to get import/export names
Since FFI doesn't support structs by value yet, this thin wrapper
library just provides versions of the import/export name functions that
return the name by pointer. Also, I've used these functions to allow
looking up functions by name, and added a function that prints a
module's imports and exports (which is handy for debugging).

Change-Id: Iff386e0b843bd8ab3763c99d3dc445ffedb12d6a
BUG: https://github.com/dart-lang/sdk/issues/37882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161765
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-09-14 22:00:07 +00:00
Liam Appelbe 0f14261176 Reland "[vm/wasm] Boilerplate for package:wasm"
This is a reland of 2bafc322fd

Original change's description:
> [vm/wasm] Boilerplate for package:wasm
>
> So far this just builds the wasmer library, copies it into the sdk
> directory, loads the library, and allows you to compile WASM modules.
> You can't actually do anything with the modules yet.
>
> Bug: https://github.com/dart-lang/sdk/issues/37882
> Change-Id: I7d7cfe5721bbe38a6afe76f326518e714d236ed4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158367
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I8056df1e301acde2772ba2273148faa53d03173e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159321
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-21 18:23:00 +00:00
Tamir Duberstein a443e60e01 [dart:io] Remove dependency on FIDL
ListInterfaces copied from Linux; Fuchsia's fdio implements getifaddrs
since https://fuchsia.googlesource.com/fuchsia/+/a8b1df8.

Change-Id: I6fa03dfa8a446551e4fa1ad3c0309ad51bb93310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159220
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2020-08-19 17:00:16 +00:00
Tess Strickland 2546ad268f Revert "[vm/wasm] Boilerplate for package:wasm"
This reverts commit 2bafc322fd.

Reason for revert: Build failures on Flutter HHH CI bots and golem (Dart VM ARMv8, Flutter).

Original change's description:
> [vm/wasm] Boilerplate for package:wasm
> 
> So far this just builds the wasmer library, copies it into the sdk
> directory, loads the library, and allows you to compile WASM modules.
> You can't actually do anything with the modules yet.
> 
> Bug: https://github.com/dart-lang/sdk/issues/37882
> Change-Id: I7d7cfe5721bbe38a6afe76f326518e714d236ed4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158367
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com

Change-Id: I2c5b390987bf45704a3de98e050f4bcf1cb235d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159243
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-08-19 08:07:19 +00:00
Liam Appelbe 2bafc322fd [vm/wasm] Boilerplate for package:wasm
So far this just builds the wasmer library, copies it into the sdk
directory, loads the library, and allows you to compile WASM modules.
You can't actually do anything with the modules yet.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I7d7cfe5721bbe38a6afe76f326518e714d236ed4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158367
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-08-18 23:55:31 +00:00
Liam Appelbe 6bd220f556 Reland "[vm] Fix some Fuchsia tests"
This reverts commit 17faf89d02.

The fix is in eventhandler_fuchsia.cc. Rather than changing the
condition on line 401, I've just weakened the assert.

Change-Id: Ia6b1f35e479e4b2fdf1adc77e9513551221a7696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157564
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-06 21:29:29 +00:00
Liam Appelbe 17faf89d02 Revert "[vm] Fix some Fuchsia tests"
This reverts commit 3ec7ea15ec.

Reason for revert: Causes timeouts in some Flutter Fuchsia tests

Original change's description:
> [vm] Fix some Fuchsia tests
> 
> Change-Id: I2a6bedeee059bd461cbc00cc5d13df2bdf3154a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156702
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I156eee7eb424fcfbc5bbf1b4a11d3d9eeab920a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157441
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-05 23:46:56 +00:00
Clement Skau fd5140d491 [SDK] Fix VM/kernel version mix in build.
Several people have experienced build issues traced back to
target `//utils/dartanalyzer:generate_summary_strong`.
The issue is triggered by the sdk_hash changing with an old
kernel-service snapshot in the out/ folder.
`generate_summary_strong` uses but does not explicitly depend on
the kernel-service, causing the outdated dependency.
This then causes 'Unexpected Kernel SDK Version' when the new dart
binary tried to load the old kernel-service snapshot.

Tested:
1. Clean build of create_sdk at HEAD.
2. Empty `git commit --amend` to modify commit and thus sdk hash.
3. Rebuild of create_sdk (which failed before).

Cq-Include-Trybots: dart/try:analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-mac-release-try,analyzer-nnbd-linux-release-try,analyzer-win-release-try,benchmark-linux-try,dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,dart-sdk-win-try,flutter-analyze-try,front-end-linux-release-x64-try,pkg-linux-release-try,vm-kernel-linux-release-x64-try
Change-Id: Iba07e9d0c5daa7a93870fb501d9bb57682c88a5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156913
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-08-05 11:46:28 +00:00
Alexander Aprelev ea43e6e267 [build] Make clang-cl targeting ia32 to be goma-compatible.
Stack-alignment flags are not supported by clang-cl, warning messages produced by clang-cl throw off gomas compiler version detection.

Change-Id: I259ed57e72f6c26eb1f01ac2c6dd49ec2e90978c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157100
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-08-04 21:25:39 +00:00
Liam Appelbe 3ec7ea15ec [vm] Fix some Fuchsia tests
Change-Id: I2a6bedeee059bd461cbc00cc5d13df2bdf3154a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156702
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-08-03 22:24:28 +00:00
Roland McGrath 1b1a39708c [build] Use frameworks instead of libs
Newer GN doesn't allow `*.framework` elements in `libs`.  It
requires using `frameworks` instead.  The toolchain definitions need
to pass the new substituted variable to the link to make use of the
new required way to express these dependencies.

Bug: fxbug.dev/56683
Change-Id: I62e68a8e5bdfef095b72b38d9d41f757e510012b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155482
Auto-Submit: Roland McGrath <mcgrathr@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-07-22 21:40:39 +00:00
Liam Appelbe 6fc75e6a2b [vm] Add tests and packages to the Fuchsia package
Also, delete some unnecessary files from build/fuchsia, and add an async
dispatcher to os_fuchsia.

Change-Id: I477e58d54330e83b2c7b6463395a1212707f8ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154162
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-07-15 20:44:06 +00:00
Liam Appelbe 089d6fc016 [vm] Build a runnable Fuchsia package containing Dart
Everything in the build/fuchsia director (except for tests.cmx) was
copied and modified from:
https://fuchsia.googlesource.com/samples/+/refs/heads/master/build

This doesn't include any tests yet, but its runnable on the emulator.

Change-Id: Id64ae71062447c789ca4d10ed3a4a09e0a6d7b99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152589
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-07-10 18:10:05 +00:00
Alexander Aprelev d33e51df3c [build] Support --clang when building dart sdk on Windows.
It relies on flutter copy of clang distribution, same one that is used to build flutter/engine.

It addressed several deprecated warnings from clang compiler for functions like strdup, unlink, etc.

It allows few warnings still since they are triggered in third_party sources.

Change-Id: Ieb13792c011438d46dbbc0fa030e1b5e4ea14315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142704
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-25 03:36:41 +00:00
Liam Appelbe 764e72800f Reland "Revert "Add an --os=fuchsia option to build.py:""
This reverts commit d39d4d0d55.

Reason for revert: Relanding with fix

Change-Id: I6d6911b6cdc578a3b576b237db94c7f1db9824b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151600
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 00:24:31 +00:00
George Wright d39d4d0d55 Revert "Add an --os=fuchsia option to build.py:"
This reverts commit 4ce18ab931.

Reason for revert: bad merge, caused build breakages in flutter/engine

Original change's description:
> Add an --os=fuchsia option to build.py:
> 
> tools/build.py --os=fuchsia runtime create_sdk
> 
> This is analogous to --os=android. It cross compiles from Linux x64 to
> Fuchsia.
> 
> A lot of the build rules are just slightly different between the existing
> Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
> example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
> So to support this I had to add a new variable, using_fuchsia_gn_sdk,
> analogous to using_fuchsia_sdk. Flutter will need to set this to false.
> 
> Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com,kaushikiska@google.com,matthewcarroll@google.com

Change-Id: If01ee34eba906c55f2d56ba650748a86e81e701c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151321
Auto-Submit: George Wright <wrightgeorge@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-06-15 23:01:53 +00:00
Liam Appelbe 4ce18ab931 Add an --os=fuchsia option to build.py:
tools/build.py --os=fuchsia runtime create_sdk

This is analogous to --os=android. It cross compiles from Linux x64 to
Fuchsia.

A lot of the build rules are just slightly different between the existing
Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
So to support this I had to add a new variable, using_fuchsia_gn_sdk,
analogous to using_fuchsia_sdk. Flutter will need to set this to false.

Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-15 20:05:16 +00:00
Alexander Thomas 5f8c21f9e9 [build] Use a sysroot also for the host toolchain when cross compiling
Previously, we didn't use a sysroot for the host toolchain used to
create the host_tool used in dart_actions. The compile action then
failed on the new goma backend causing long build times.

Before (dart-sdk-linux-try/429, ~38 mins):
finished=10627 cache_hit=7334 retry=3277 fail=3277

After (dart-sdk-linux-try/430, ~12 mins):
finished=10625 cache_hit=7352 retry=0 fail=0

Change-Id: Iebf967be6eb67c3056f766839a3d58d18fc608f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150421
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2020-06-08 16:50:21 +00:00
Martin Kustermann d7e2f9ba3b [infra] Remove wheezy left overs from SDK
Also removes some dart editor related code which is unused nowadays.

Related https://dart-review.googlesource.com/c/sdk/+/150104

Change-Id: I97f91a35e82af09ac715a4eb93a945f335a71d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150106
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-04 18:32:29 +00:00
Ryan Macnak 14dfa1b9ee [vm] Fix gcc build.
Change-Id: I6634dc10fdc8d7523562c0fcc20e3561eb580acf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146023
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-05-04 21:15:27 +00:00
Ryan Macnak 6fe15f6df9 [vm] Represent tagged pointers as C++ value types instead of C++ pointer types.
This works around bugs in UndefinedBehaviorSanitizer and Clang.

Bug: b/28638298
Change-Id: I6be595f9664516019d28017d24559583a1ae3a21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144354
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-25 05:21:27 +00:00
Simon Que 35ce88100c [build] GN flag to use relative symlink to Xcode
The flag "mac_use_goma_rbe" creates a symlink to the Xcode SDK
directory, under $root_build_dir/sdk/xcode_links.

e.g. the -isysroot arg in the build command becomes:
  -isysroot sdk/xcode_links/MacOSX10.15.sdk

This is based on a similar solution for Chromium iOS builders:
http://crrev.com/c/1946174
http://crrev.com/c/2102649

Bug: b/151697301
Change-Id: Ie65d3ae2b98da5977ad0f5a75f865c838bbbb963
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139782
Commit-Queue: Simon Que <sque@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-19 08:33:17 +00:00
asiva e33d023fa0 [BUILD] - Format gn files, this is being done to ensure the unfork CL
doesn't show these formatting changes as diffs.

Change-Id: I69ccbf4adabc66d88371cece785a2c1bce60f133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138962
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-03-10 21:56:11 +00:00
Ryan Macnak 73f6d15665 [build] Update clang and gn to match Fuchsia.
This new version has functional TSAN.

Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Ia9835fb6ad6de73f43faea695f893ed0c62fffa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136380
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-24 21:04:18 +00:00
Samir Jindel 6a8aae0095 [vm] Enable Dart VM to run in QEMU user-mode emulation for ARM.
Normally we consult /proc to determine the host architecture. However, this
reports the actual host architecture, not the QEMU-simulated one.

Also, GDB cannot debug position-independent executables in QEMU, so we disable
PIE when compiling for execution in QEMU.

Pass '--use-qemu' to 'gn.py' to build for QEMU.

Change-Id: Ib125127ceb0582b66754cfc0da22e09d224ee1e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125267
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-18 16:58:53 +00:00
Ryan Macnak ecd7977928 [vm] Fix gcc build.
Change-Id: I8a0a9a695403dc6d048dccb9f33642d70cc5d588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121866
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-10-17 16:51:32 +00:00
Ryan Macnak 71ecb73a2b [vm] Fix one MSAN failure; add UBSAN configuration.
Change-Id: I5b1d43836f3eb09983195fc3792f369aa3f8079f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120750
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-10-09 23:38:30 +00:00
Alexander Aprelev cee3f71e29 [build] Advise ninja to ignore out-of-date .lib files.
MSVC won't update .lib file if there were no changes, and this restat attribute tells ninja to honor that.

Change-Id: If78184aecf13578617570478cbf158276981e25d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120747
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-10-09 03:16:50 +00:00
Ryan Macnak d5feab0c53 [vm] Create builds for LeakSanitizer, MemorySanitizer and ThreadSanitizer.
Change-Id: I65905ec76fcde8b7f4063cb5b80a3d034b453153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120323
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-10-07 16:24:22 +00:00
Teagan Strickland 785ae930d3 [gardening] Fix NNDB flag use for Flutter HHH build.
Our //build/config/BUILDCONFIG.gn isn't used for Flutter, so we must
put the default version where the Flutter build can see it.

Change-Id: I99afc99209b3721c48aa56ef413910d34df1bb8c
Cq-Include-Trybots: luci.dart.try:flutter-engine-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120580
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2019-10-07 09:47:02 +00:00
Robert Nystrom e919e89d0b Add an "--nnbd" flag to build.py.
This treats whether or not to use the forked NNBD SDK as a build flag
similar to mode or architecture. When this flag is passed, it appends
"NNBD" to the main output directory, like xcodebuild/ReleaseX64NNBD.

It also defines a "use_nnbd" flag that is available inside BUILD.gn
files to determine whether or not to use the forked SDK. This flag
currently isn't used. Implementation teams will need to edit their
build steps to take that into account.

In order to use this mode on the bots, we'll need to tweak the bot
scripts to figure out whether the mode is enabled or not. There are a
couple of TODOs in the Python scripts for that. I'm not sure how that
should be specified in dart_sdk.py.

This CL does not remove my previous change to allow building the NNBD
fork next to dart-sdk in the same root output directory. I'll revert
those changes in a different CL once this one lands.

Change-Id: I3bd28f273106ee90caf9474b2fadad120b2c2d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119602
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-10-03 00:11:32 +00:00
Alexander Aprelev 34087a61ba [build] Remove dart_host_toolchain.
Consensus seems to be that there should be different mechanism to support host-targeting-host vs host-targeting-target configuration: comparing toolchains names won't work for that.
Also, dart_host_toolchain was set up to be used by Fuchsia, but it is no longer being used.

Change-Id: Ic2e63d8cef00b18bf6866122199027459eaf32c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118910
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-27 21:14:11 +00:00
Mayank Patke 0d0630bf52 Compile with -lpthread by default on linux.
This allows zlib_bench to link properly and we can use the "all" build
target again.

Change-Id: I95ae0c41fb988245dd472da81cb06424d1209786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117212
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-09-16 19:58:31 +00:00
Samir Jindel d2dc053752 Corrections to "[vm] Fix ASAN build."
Change-Id: I83c78b18e25847edb6c8cc8256245667f1483619
Cq-Include-Trybots: luci.dart.try:vm-kernel-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115711
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-05 20:50:32 +00:00
Samir Jindel 75374b89f6 [vm] Fix ASAN build.
Change-Id: I6e5c40412493933a0a21f4df880f367840fd68cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115710
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-09-05 17:16:43 +00:00
Samir Jindel be66176534 [vm/linux] Don't expose symbols from statically-linked libc++.
Issue https://github.com/dart-lang/sdk/issues/38141

On Windows and OSX, we dynamically link against libc++, so there is no issue.
On Android we already hide symbols from libc++.

Change-Id: I17debc4d0efec3cebc203672333afb44390b0e0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115403
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-09-05 15:05:53 +00:00
Liam Appelbe 0fee296130 [vm] Add wasmer to third_party, and support building rust libraries
This isn't linked in to anything yet, but I've verified that it works.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: Ib65d7f11aacac1a20d93fc5d4f10ced19ecb1e51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113263
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-20 16:56:10 +00:00
Nate Bosch 55f81f2210 Mass format python with yapf
- Add `.style.yapf` with configuration to use Google style.
- Run `yapf` on all `.py` files in this repo.
- Manually fix one trailing space in a doc string.
- Run `git cl format runtime` to satisfy presubmit.

Change-Id: I7e6bd11e91f07926b9188362599af398551eed79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111600
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-08-05 20:34:31 +00:00
Alexander Aprelev 521a106332 [infra] Update VS toolchain to stay up-to-date with flutter engine and chrome
Visual Studio is at 2017 Update 9 now.

Change-Id: Id577de7bf08e8ebedffbeec4c467f78b0f76adcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108906
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-07-31 20:01:01 +00:00
Lorenz Nickel 79e478e50e Fixed some links
**I fixed some links and some other minor flaws.**

I also found the following outdated links, which I didn't fix:

- [This link](https://github.com/dart-lang/pool/tree/zone.strong) in [this file](https://github.com/dart-lang/sdk/blob/master/docs/newsletter/20170728.md) (didn't fix because don't know new location and this is some sort of archive so the link should probably stay the original)
- [This link](https://www.dartlang.org/tools/analyzer) in [this file](https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_cli/lib/src/options.dart) (didn't fix since the link is still working, it just gets redirected and the link is part of the programm, I don't want to break anything by changing it, all other links are in comments)
- [This link](https://github.com/domokit/mojo/issues/728) in [this file](https://github.com/dart-lang/sdk/blob/master/build/config/compiler/BUILD.gn) (didn't fix since probably has no new location and is part of TODO, which I don't want to change)

While doing all this I also noticed that [these tests](https://github.com/dart-lang/sdk/tree/master/tests/compiler/dart2js_extra) contain a lot of other inconsistencies in their comments and the location of the import-statements (I only fixed one which was not link-related), could be target of another PR.

Closes #36927
https://github.com/dart-lang/sdk/pull/36927

GitOrigin-RevId: 71d05d0b52d8ec5b92d077a070e066d1fdd4bbfa
Change-Id: Ide4b2424fccad8ae2e06c788efd4443dc0de997b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102222
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-07-01 16:21:41 +00:00
Ryan Macnak 60f37fa189 Fix builds targeting Android from a Windows host gen_snapshot.
Change-Id: I424fc1b542de7c90799f231499d525cbde699aa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104950
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-06-07 00:49:33 +00:00
Vyacheslav Egorov b53162d82b [build] Link with dl library on linux by default.
Otherwise executables simply does not link because C++ std lib we are
using has dependency on dl (through libunwind).

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

Note: this follows what newer versions of build configs do. See for
example one used in Flutter build root[1]

[1] 224ebe0ada/build/config/BUILD.gn (L121)

Change-Id: I405c820db4363a59230d7ba4f93d760a8cbbabc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103627
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-05-24 14:07:05 +00:00
Ryan Macnak 704fe5e663 [build] Newer versions of Mac have a predefined _FORTIFY_SOURCE that creates a conflict trying to set it with a compiler argument.
Change-Id: I7518f30a8eaf4302f76326db1ea970fdd9760f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101324
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-06 23:50:32 +00:00
Stevie Strickland 4028fec3b5 Reland "[vm] Finish adding support for ECMAScript 2018 features."
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: Ie62e6082a0e2fedc1680ef2576ce0c6db80fc19a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100641
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-04-29 09:11:48 +00:00
Keerti Parthasarathy 9238e25305 Revert "[vm] Finish adding support for ECMAScript 2018 features."
This reverts commit 5ebb640a67.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [vm] Finish adding support for ECMAScript 2018 features.
> 
> This work pulls in v8 support for these features with
> appropriate changes for Dart and closes
> https://github.com/dart-lang/sdk/issues/34935.
> 
> This adds support for the following features:
> 
> * Interpreting patterns as Unicode patterns instead of
>   BMP patterns
> * the dotAll flag (`/s`) for changing the behavior
>   of '.' to also match line terminators
> * Escapes for character classes described by Unicode
>   property groups (e.g., \p{Greek} to match all Greek
>   characters, or \P{Greek} for all non-Greek characters).
> 
> The following TC39 proposals describe some of the added features:
> 
> * https://github.com/tc39/proposal-regexp-dotall-flag
> * https://github.com/tc39/proposal-regexp-unicode-property-escapes
> 
> These additional changes are included:
> 
> * Extends named capture group names to include the full
>   range of identifier characters supported by ECMAScript,
>   not just ASCII.
> * Changing the RegExp interface to return RegExpMatch
>   objects, not Match objects, so that downcasting is
>   not necessary to use named capture groups from Dart
> 
> **Note**: The changes to the RegExp interface are a
> breaking change for implementers of the RegExp interface.
> Current users of the RegExp interface (i.e., code using Dart
> RegExp objects) will not be affected.
> 
> Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
> Commit-Queue: Stevie Strickland <sstrickl@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=lrn@google.com,kustermann@google.com,jmesserly@google.com,johnniwinther@google.com,sstrickl@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I1eda0fee4fd9e94df095944049833a67b07277e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100560
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-25 14:29:51 +00:00
Stevie Strickland 5ebb640a67 [vm] Finish adding support for ECMAScript 2018 features.
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-24 09:24:16 +00:00
Joseph Richey 86fe7ca75c Fix build when python=python3
Right now most of the dart SDK's python is compatible with python2
or python3. This change fixes a few of the build scripts to make
that completely true (at least when building the standard build on
Linux). There are only four types of changes:
  - Bare `print` statements now use the `print ()` function
  - `commands.getoutput` becomes `subprocess.check_output` with `shell=True`
  - `xrange` becomes `range`
  - `print >> sys.stderr` becomes `sys.stderr.write`

Starts work on addressing (but does not completely fix):
https://github.com/dart-lang/sdk/issues/28793

See related issue:
https://fuchsia-review.googlesource.com/c/fuchsia/+/272925

This change applys to both the `dev` and `master` branches.

Change-Id: Ibd3eb9b1f57520d2d745f05c2ac430b1d20943da

Closes #36662
https://github.com/dart-lang/sdk/pull/36662

GitOrigin-RevId: beab165294982a7e369daf6d61aea63efcab1b9b
Change-Id: I6d240749a9ba0889b5a45a08f3c4c2c20291f484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99707
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2019-04-23 07:48:15 +00:00
Alexander Aprelev 1dd72d4309 Revert "[vm/build] Expose is_release/is_profile so they are available in third_party gn scripts." and different fix.
Patchset 1 reverts commit f3aaf8a770 as it will
present problems in other embedders which will have to deal with is_profile argument.

Patchset 2 fixes the build by switching from is_product to dart_runtime_mode

Change-Id: I167e6f531af3b0fb0f3e006b074ebdf1b69f3fe5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98601
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-04-03 17:06:47 +00:00
Alexander Aprelev f3aaf8a770 [vm/build] Expose is_release/is_profile so they are available in third_party gn scripts.
Follow-up to https://dart-review.googlesource.com/c/sdk/+/98434 as that broke hhh build(https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/1553).

Requires changes to flutter engine:
```
diff --git a/tools/gn b/tools/gn
index 7dacacf06..83bd7d9da 100755
--- a/tools/gn
+++ b/tools/gn
@@ -134,6 +134,9 @@ def to_gn_args(args):
     else:
         gn_args['dart_runtime_mode'] = runtime_mode

+    gn_args['is_release'] = gn_args['dart_runtime_mode'] == 'profile'
+    gn_args['is_product'] = gn_args['dart_runtime_mode'] == 'release'
+
     if args.dart_debug:
         gn_args['dart_debug'] = True

```

Change-Id: I2cf2473bade0f14cdd94fc9ff18febe313e26b55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98459
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-03 00:55:30 +00:00
Jonas Termansen b60b664b16 [infra] Make gclient sync quiet when nothing is updated.
The 7zip dependency is only used on Windows. Use gclient's OS-specific
hook feature to only download it while on Windows. This avoids the
download from google cloud storage from needlessly saying it is doing
nothing.

There's no reason to point out the sysroot is already up to date as this
makes gclient output several lines of text with zero information.

Change-Id: Id1c212c8a951612c413e9834867fe90f6dca6a20
Reviewed-on: https://dart-review.googlesource.com/c/94752
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2019-03-01 13:02:23 +00:00
Vyacheslav Egorov 116f678a69 [build] Enable mitigations for Cortex-A53 Erratum #843419 bug.
We have already hit this bug in June and yesterday we hit it again.

Change-Id: I68bcd71d721b84a62e359ca57315f760a3f4de01
Reviewed-on: https://dart-review.googlesource.com/c/89640
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-01-15 16:50:33 +00:00
Alexander Aprelev dd1f62cd55 Revert "Rollback to C++11."
This reverts commit 8b01876d79 as /std:c++11 is no longer support by current Visual Studio toolchain.

Change-Id: Ib5c246aee90f097d3fdf6637c4ffdcb65128835a
Reviewed-on: https://dart-review.googlesource.com/c/85980
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-12-05 17:01:03 +00:00
Zach Anderson 031e77eea1 [infra] Update Clang toolchain and GN
We no longer rely on Fuchsia's buildtools, instead we directly fetch
Clang and GN packages from CIPD using gclient support.

Change-Id: I8995d89babf9c3c6b30214a1133e7b0a1cb9a796
Reviewed-on: https://dart-review.googlesource.com/c/85416
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-29 15:37:40 +00:00
Zach Anderson 44a9d0a0d6 Revert "Reland: [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9"
This reverts commit ad69aaef62.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland: [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9
> 
> Tries to work around update.py race by setting up symlinks for 'git cl format'
> instead of copying.
> 
> Change-Id: I4ed9b99254803feea5ea0e8d30db23fc982e9562
> Reviewed-on: https://dart-review.googlesource.com/c/85427
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com

Change-Id: Ida584adda37cd3e2dac16654eb1e81e92f123f88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/85467
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-27 23:35:08 +00:00
Zach Anderson ad69aaef62 Reland: [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9
Tries to work around update.py race by setting up symlinks for 'git cl format'
instead of copying.

Change-Id: I4ed9b99254803feea5ea0e8d30db23fc982e9562
Reviewed-on: https://dart-review.googlesource.com/c/85427
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-27 23:02:59 +00:00
Zach Anderson 8c69ec8c07 Revert "Reland: [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9"
This reverts commit 03ff950922.

Reason for revert: Race in update script.

Original change's description:
> Reland: [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9
> 
> Fixes Android build
> 
> Change-Id: Ifcdf492a636bd2c683be8f37bcad4a2af09fb822
> Reviewed-on: https://dart-review.googlesource.com/c/85404
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com

Change-Id: I030425cba496d17383cdda37b0e67dff55f1f7fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/85409
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-27 15:56:13 +00:00
Zach Anderson 03ff950922 Reland: [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9
Fixes Android build

Change-Id: Ifcdf492a636bd2c683be8f37bcad4a2af09fb822
Reviewed-on: https://dart-review.googlesource.com/c/85404
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-27 15:48:27 +00:00
Zach Anderson 08c42ad75d Revert "[infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9"
This reverts commit c2f1cd49a3.

Reason for revert: Broke android build

Original change's description:
> [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9
> 
> Change-Id: I277e48e077aa8025e5d6e99fc46895bb57073c1c
> Reviewed-on: https://dart-review.googlesource.com/c/84448
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com

Change-Id: I460f9bceb3c2e9e53cbed848ed99cb1ac00491cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/85422
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-26 20:25:55 +00:00
Zach Anderson c2f1cd49a3 [infra] Roll buildtools to c72a1c5aadde06505b7bb4641720880f3db28ff9
Change-Id: I277e48e077aa8025e5d6e99fc46895bb57073c1c
Reviewed-on: https://dart-review.googlesource.com/c/84448
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-26 19:25:55 +00:00
Samir Jindel 8b01876d79 Rollback to C++11.
Flutter is compiling us with C++11 so we can't use C++14 features anyway.

Change-Id: I259e70f80442910dd7bf230f5f4e5025bea28802
Reviewed-on: https://dart-review.googlesource.com/c/85202
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-11-22 17:58:52 +00:00
Alexander Thomas fd7b86e159 [toolchain] Update Windows VS toolchain to current Chromium one (18fbbd3).
Changes to the canonical are the addition of a comment header and path-setting lines:
```
chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir))
SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.join(chrome_src, 'tools'))
```

TBR=aam@google.com

Change-Id: Ia79f6ba6cab1504c2e09370fccc03909862923ea
Reviewed-on: https://dart-review.googlesource.com/c/84630
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2018-11-18 22:06:49 +00:00
Vyacheslav Egorov 523353d280 [build] Move to Jessie sysroots from Wheezy sysroots.
Wheezy is not supported anymore (EOL May 2018) and these sysroots are
really outdated, which introduces build problems whenever we try to
use recent enough features and header files.

We are already using Jessie to build Dart SDK distributions and in some cases we use
Jessie to build binaries for testing (e.g. when building on ARM64).

This CL makes it uniform.

Change-Id: Id4d165a41aa37118f5e49edb2122d905219cd377
Reviewed-on: https://dart-review.googlesource.com/c/81409
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-10-25 15:05:22 +00:00
Vyacheslav Egorov 8a5405fc40 [build] Add //third_party/android_tools BUILD file needed by zlib
Change-Id: I4f641bcc4940ab508f38b32397455f996659784b
Reviewed-on: https://dart-review.googlesource.com/c/81363
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-24 18:39:36 +00:00
Vyacheslav Egorov 2c83eb550e [vm] Integrate dart binary with Crashpad on Windows.
dart binary would instantiate CrashpadClient if DART_CRASHPAD_HANDLER
and DART_CRASHPAD_CRASHES_DIR environment variables are set.

- DART_CRASHPAD_HANDLER should contain the path to the crashpad_handler
binary that would handle the crash and write minidump;
- DART_CRASHPAD_CRASHES_DIR should contain the path to the crashpad database
which would be used to store minidumps.

Rewrite --copy-crash-dumps support on windows to use Crashpad integration
instead of editing Windows registry.

Embedding crashpad required to roll a new zlib version because Crashpad
depends on the zlib. This version of zlib is buildable with its own
BUILD.gn so our custom BUILD.gn is removed.

Change-Id: I048aad16b234e1d750f0a24782b04e3b6e19703d
Reviewed-on: https://dart-review.googlesource.com/c/81007
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-10-24 13:30:16 +00:00
asiva 854720a099 Fix build rule.
Change-Id: Ib92c3a04ca93bd18b45210c0f615d78418c5989a
Reviewed-on: https://dart-review.googlesource.com/c/77941
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-03 20:25:36 +00:00
asiva 30aa464f77 [VM] Remove 'corelib' and 'dart-io' sources generation into C++ arrays
- Remove all code that generates the corelib and dart:io library sources into C++ arrays and link them into dart_bootstrap
- Remove the executable dart_bootstrap and all uses of it
- Remove bootstrap_nolib.cc and builtin_nocore.cc
- Remove the Dart 1 code in core lib bootstrap path

Change-Id: Ifd33496204285a08b42fe09e39428e7a92b416b6
Reviewed-on: https://dart-review.googlesource.com/c/77241
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-02 23:27:05 +00:00
Alexander Aprelev e7d71bedf5 [toolchain] Update Windows VS toolchain to current Chromium one.
Changes to the canonical are only addition of a comment header and path-setting lines:
```
chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir))

SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

sys.path.insert(0, os.path.join(chrome_src, 'tools'))
```

Change-Id: I403c1d7dd56cc45fcddd93142e8929e8cd5ae75f
Reviewed-on: https://dart-review.googlesource.com/76705
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-09-26 17:09:36 +00:00
Ryan Macnak 0c80630577 [vm] Fix ia32/x64 gcc build.
(The simulators are broken at runtime.)

Change-Id: I10089cad44fca57145cfdd598342279f07c6d7fd
Reviewed-on: https://dart-review.googlesource.com/75205
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-17 22:27:43 +00:00
Zach Anderson 576f01045a [build] Copy Observatory assets with GN rather than observatory_tool.py
Change-Id: Ib6faf31fffaa49dadbf47056cbce353348b7680c
Reviewed-on: https://dart-review.googlesource.com/64241
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-07-10 19:08:47 +00:00
Zach Anderson 7d7e39a952 [build] Move dart2js run for Observatory from python to GN
Change-Id: Ief90d6125e30c6bed808bacce521fc84957fddb9
Reviewed-on: https://dart-review.googlesource.com/63662
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-07-03 22:50:16 +00:00
Ryan Macnak 72747f6205 [build] Remove absolute paths from object files and vm_platform.dill.
The only remaining absolute paths in the VM binary are from kernel_service.dill.

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: Ie002e0f6e64c289dab475ca60b240c13f8316ae6
Reviewed-on: https://dart-review.googlesource.com/62728
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-28 18:21:27 +00:00
Ryan Macnak ef95f2ded6 [build] Enable linker identical code folding.
Change-Id: I04ab9ef71c41f96abd2d9e23ee107937617fb99d
Reviewed-on: https://dart-review.googlesource.com/62707
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-28 17:30:17 +00:00
Alexander Thomas 66c9109caf [infra] Download checked in SDKs from CIPD
#33659

Change-Id: I94fccf4bbce2f0140bf0d6efa953d44b290df856
Reviewed-on: https://dart-review.googlesource.com/62840
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-28 16:08:14 +00:00
Zach Anderson b15572933d Update checked-in Dart SDK to 2.0.0-dev.64.1
Updated to pass --dfe to invocations of the
checked-in SDK.

Change-Id: I47e122422926d235f166972669c8c2cb18a89735
Reviewed-on: https://dart-review.googlesource.com/62201
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-25 21:39:35 +00:00
Ryan Macnak 8d82cdd6d8 [build] Enable PIE on non-IA32 Linux.
(Gets ASLR working to hopefully make non-determinism surface more often.)
(Thought I enabled this back in 2015...)

Bug: b/22479195
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I02381e364ccb8bccbf5aa561959bceb7be067128
Reviewed-on: https://dart-review.googlesource.com/59281
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-11 23:27:45 +00:00
Ryan Macnak af599046e4 Propagate 'testonly' in 'dart_action' et al.
Change-Id: I1fad726fe9a809d5917b7d9a92414be59f6157be
Reviewed-on: https://dart-review.googlesource.com/59181
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-07 20:47:02 +00:00
Zach Anderson 9c70462e3c [vm] Roll boringssl to 189270cd190267f5bd60cfe8f8ce7a61d07ba6f4
fixes #33229

Change-Id: I786c2f48108a3e00b3b3ef2ae8a68ddaac256fda
Reviewed-on: https://dart-review.googlesource.com/56628
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-24 22:04:30 +00:00
Zach Anderson 24f5ca0187 [fuchsia] Use Fuchsia prebuilts
This is still using the prebuilts from Dart's bot for building
the Observatory. Instead, we should probably build/take the
Observatory from Fuchsia's bots.

Change-Id: I466061d6f7176e2b76912d303ef0b0c518d19e1e
Reviewed-on: https://dart-review.googlesource.com/55580
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-17 20:54:06 +00:00
Alexander Aprelev 66412a28f2 Use %systemroot% instead of hardcoded 'C:\Windows'
Change-Id: I49f1e4aa01707d5a5b2dcc1dfad0e650b95cdb20
Reviewed-on: https://dart-review.googlesource.com/53820
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-07 15:40:00 +00:00
Zach Anderson 4877587346 [GN] Uses dart_action.gni instead of compiled_action.gni.
This avoids conflicts with client repos that have a file
//build/compiled_action.gni with something different in them.

Change-Id: I133f66b0989bcb547cb8eed8710a88e2c1384bd7
Reviewed-on: https://dart-review.googlesource.com/53440
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-03 21:07:13 +00:00
Ryan Macnak 7e54844fe7 [vm] Fix build for gcc 7.3.0.
Change-Id: I02ead73679c3a6e1e5c9313f78c5f02ad6ca79b0
Reviewed-on: https://dart-review.googlesource.com/53521
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-03 17:59:44 +00:00
Zach Anderson 29e78adec8 [infra] Use a relative path for the Linux sysroot
This may help goma have more cache hits.

Change-Id: I44a4ea0d545798f6c7997af89970de9d69e3a6f4
Reviewed-on: https://dart-review.googlesource.com/51701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-18 21:14:23 +00:00
Zach Anderson 978840a42f [infra] Use a jessie sysroot for sanitizer builds
Change-Id: Ia91c6c10acebf2e94485dfbcbb5c4b38d772bc7d
Reviewed-on: https://dart-review.googlesource.com/45820
Reviewed-by: William Hesse <whesse@google.com>
2018-03-09 11:52:25 +00:00
Vyacheslav Egorov 11c77930e0 [infra] Turn on C++14 in the compiler config
Change-Id: I1b059deee64cf653be14e4a908050f1ff9c53781
Reviewed-on: https://dart-review.googlesource.com/45682
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-09 09:13:08 +00:00
Zach Anderson 8240134d66 [infra] Roll boringssl forward. Use clang for arm on Linux.
fixes: #32363
Change-Id: I68c3ea314b320e51e0dcbdc98b71cf3150800837
Reviewed-on: https://dart-review.googlesource.com/45742
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-03-08 18:09:28 +00:00
Zach Anderson 6810d4604b [infra] Roll toolchain.
related #32364, #32363, #32362

Change-Id: Ia8ac3af0317fc67efb2a38e506b2924780473b8f
Reviewed-on: https://dart-review.googlesource.com/44400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-03-01 20:09:29 +00:00
Zachary Anderson e842c9b0b5 [infra] Use dart_action() instead of python scripts
This change shifts logic for invoking Dart scripts during the build
from a couple of python scripts to a new template called dart_action().

Change-Id: Ic0818122cd7317cbd22a7255d880fe8f87271b7e
Reviewed-on: https://dart-review.googlesource.com/39260
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-02-06 21:51:13 +00:00
James Robinson 138d587e3a [gn] Remove uses of is_fuchsia_host GN variable
Some parts of the Dart build need to be customized when running the
host steps for a build ultimately targeting a Fuchsia build. This was
set by passing a special GN variable indicating that a configuration
was a host configuration targeting a Fuchsia build, but the built-in GN
variable 'target_os' has the same result as it is the same across all
toolchains in a particular build.  This replaces the test:
  is_fuchsia || is_fuchsia_host

with the equivalent:
  target_os == "fuchsia"

and the less common:
  is_fuchsia_host

with:
  target_os != current_os && target_os == "fuchsia"

Change-Id: Iabec1fb2879b234ca44c9e03b2f4a62ffbc6fa4a
Reviewed-on: https://dart-review.googlesource.com/35542
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-18 06:05:56 +00:00
Zachary Anderson 379a1cf24a [infra] Roll clang toolchain forward
Change-Id: Id9c98520f47ce9660efd271bc81062b93fdc035f
Reviewed-on: https://dart-review.googlesource.com/33981
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-10 21:23:39 +00:00
Zach Anderson 897c6257cd Revert "[infra] Roll clang toolchain forward"
This reverts commit 8ee7a97651.

Reason for revert: lld optimization level -Wl,-O1 appears to either
have a regression or to confuse Golem binary comparison tool.

Original change's description:
> [infra] Roll clang toolchain forward
>
> Change-Id: I41afe48f2fdc056436b58dc8158c62e9207cc43f
> Reviewed-on: https://dart-review.googlesource.com/32140
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

TBR=whesse@google.com,rmacnak@google.com,zra@google.com,athom@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I36ec03150a22f89c4cb5371dd1bf43df8a6f16f6
Reviewed-on: https://dart-review.googlesource.com/32800
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-01-06 08:27:09 +00:00
Zach Anderson cb115acf3c Revert "Try to fix build determinism problem"
This reverts commit 45289978bf.

Reason for revert: Reverting to remove merge conflict in toolchain
roll revert.

Original change's description:
> Try to fix build determinism problem
> 
> Change-Id: If88be33a79a26107d297b87da08e3c7abde4e7cb
> Reviewed-on: https://dart-review.googlesource.com/32665
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

TBR=sortie@google.com,rmacnak@google.com,zra@google.com

Change-Id: I37c23f11e87d2020d53068e457655a70a6349516
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/32801
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-06 07:49:21 +00:00
Zachary Anderson 45289978bf Try to fix build determinism problem
Change-Id: If88be33a79a26107d297b87da08e3c7abde4e7cb
Reviewed-on: https://dart-review.googlesource.com/32665
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-05 22:58:38 +00:00
Zachary Anderson 8ee7a97651 [infra] Roll clang toolchain forward
Change-Id: I41afe48f2fdc056436b58dc8158c62e9207cc43f
Reviewed-on: https://dart-review.googlesource.com/32140
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2018-01-03 23:37:15 +00:00
Zachary Anderson 75a50a1c1c [GN] Fix gn_run_binary.py for different error
The debian package builder is throwing a different kind of error.

related #31613

Change-Id: I293b31aab310867656ba05b6f62afc8bdc9285e4
Reviewed-on: https://dart-review.googlesource.com/30467
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-19 20:30:58 +00:00
Zachary Anderson d9eb629ffa [infra] Use Clang for ia32 and arm64. Use the dl'd sysroots by default.
This CL switches the ia32 and arm64 builds to use clang by default.
The arm build can't be switched at least until we roll clang to
pick up the fix for https://reviews.llvm.org/D34691.

This CL also changes to use the sysroots from wheezy (and jessie
for arm64) by default so that we can be building/testing locally with
the same setup as we are shipping in the SDK.

Change-Id: I09a1907ee7f78c3f4bb8d56ffdbbd6107ed054d9
Reviewed-on: https://dart-review.googlesource.com/25160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-02 06:19:33 +00:00
Ryan Macnak d366f9619a [vm] Toward deterministic builds.
- Remove random build-id.
 - Replace build time in embedded version string with commit time.
 - Remove timestamps from Observatory tarball.
 - Zero-initialize skipped bytes in snapshot streams.
 - Fix uninitialized fields in PatchClass, Script and Library.
 - Disable (under flag) random identity hashes and concurrent GC.

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I3e95de679c8372841cd27ca60df78d9b00ffbfe1
Reviewed-on: https://dart-review.googlesource.com/22901
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-23 00:07:56 +00:00
P.Y. Laligand ab25f54bf5 Allow the host toolchain to be set via a simple variable.
It can now be defined in a config file rather than requiring a gen argument.

Change-Id: I8f11394ee0387683c9ce48764a04b4bdf54fed9b
Bug:
Reviewed-on: https://dart-review.googlesource.com/18687
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-06 19:06:18 +00:00
Zachary Anderson a99cdabd00 Reland: [GN] Adds dart_host_sdk_toolchain argument
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.

Relanding to fix bad toolchain conditions in dart_os_config and
dart_arch_config.

TO-549

Change-Id: I276f47d9071233acb98f6029a4666da0cee33d7d
Reviewed-on: https://dart-review.googlesource.com/18361
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 19:02:18 +00:00
Zach Anderson 8f5d55623e Revert "[GN] Adds dart_host_sdk_toolchain argument"
This reverts commit 8fc90bd3bc.

Broken precomp bots due to wrong toolchain condition in dart_arch_config and dart_os_config.

Change-Id: Ic5c75f9ca3a0d4f316678354da44d1fcca10499d
Reviewed-on: https://dart-review.googlesource.com/18360
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 18:03:27 +00:00
Zachary Anderson 8fc90bd3bc [GN] Adds dart_host_sdk_toolchain argument
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.

TO-549

Change-Id: Ida92521724cf7af34b34fb8c6d3514a226c48dd4
Reviewed-on: https://dart-review.googlesource.com/18145
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-11-02 17:27:19 +00:00
Zachary Anderson 02eebb0c69 [GN] Remove the dart_host_toolchain arg
This flag can be removed after: https://github.com/flutter/engine/pull/4308
lands.

Change-Id: I4730aaece1e43cf71ea569bda78c2cd546a66358
Reviewed-on: https://dart-review.googlesource.com/18060
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-01 21:13:28 +00:00