Commit graph

163 commits

Author SHA1 Message Date
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