1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 12:06:26 +00:00
Commit Graph

318 Commits

Author SHA1 Message Date
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
Zach Anderson
381c506da5 Reland: [Windows] Update toolchain to MSVC 2017
Reland of https://dart-review.googlesource.com/#/c/sdk/+/8168/ following
fixes to bots.

This is mainly to support upcomping changes in BoringSSL, and to keep
our version of MSVC up-to-date with Chromium.

Change-Id: Ibe5dbd97e6750072ff648b3967ac8396ab81bf64
Reviewed-on: https://dart-review.googlesource.com/9001
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2017-09-28 09:25:37 +00:00
William Hesse
7f4f9347f6 Revert "Reland: [Windows] Update toolchain to MSVC 2017"
This reverts commit 51ee5ce40e.

Reason for revert: The windows vm-product builder is crashing on all tests after this commit.  The MSVC 2017 compiler apparently builds a crashing executable for product mode.  Failing build is at https://luci-milo.appspot.com/buildbot/client.dart/vm-win-product-x64-be/8697

Original change's description:
> Reland: [Windows] Update toolchain to MSVC 2017
> 
> Reland of https://dart-review.googlesource.com/#/c/sdk/+/8168/ following
> fixes to bots.
> 
> This is mainly to support upcomping changes in BoringSSL, and to keep
> our version of MSVC up-to-date with Chromium.
> 
> Change-Id: I861ee4ab10513b93ea3fb1c357766e0f942afd10
> Reviewed-on: https://dart-review.googlesource.com/8730
> Reviewed-by: William Hesse <whesse@google.com>

TBR=whesse@google.com,vegorov@google.com,zra@google.com,asiva@google.com

Change-Id: I465ad7586a76b27f6a9aa9431efbe0eb3d934b4e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/8800
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2017-09-27 09:40:38 +00:00
Zach Anderson
51ee5ce40e Reland: [Windows] Update toolchain to MSVC 2017
Reland of https://dart-review.googlesource.com/#/c/sdk/+/8168/ following
fixes to bots.

This is mainly to support upcomping changes in BoringSSL, and to keep
our version of MSVC up-to-date with Chromium.

Change-Id: I861ee4ab10513b93ea3fb1c357766e0f942afd10
Reviewed-on: https://dart-review.googlesource.com/8730
Reviewed-by: William Hesse <whesse@google.com>
2017-09-27 08:26:53 +00:00
William Hesse
359b745c4e Revert "[Windows] Update toolchain to MSVC 2017"
This reverts commit 42d93ff083.

Reason for revert: The windows bots don't have the correct authorization file to download our internal copy of MSVC 2017.

Original change's description:
> [Windows] Update toolchain to MSVC 2017
> 
> This is mainly to support upcomping changes in BoringSSL, and to keep
> our version of MSVC up-to-date with Chromium.
> 
> Change-Id: Id6148b74a7e986147faf721b2923599f148b8b3a
> Reviewed-on: https://dart-review.googlesource.com/8168
> Reviewed-by: William Hesse <whesse@google.com>

TBR=whesse@google.com,vegorov@google.com,zra@google.com,asiva@google.com

Change-Id: I89dd1c8250d997a01bbc8de1a13cd86d5342c316
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/8660
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2017-09-26 15:21:32 +00:00
Zach Anderson
42d93ff083 [Windows] Update toolchain to MSVC 2017
This is mainly to support upcomping changes in BoringSSL, and to keep
our version of MSVC up-to-date with Chromium.

Change-Id: Id6148b74a7e986147faf721b2923599f148b8b3a
Reviewed-on: https://dart-review.googlesource.com/8168
Reviewed-by: William Hesse <whesse@google.com>
2017-09-26 15:03:38 +00:00
Zachary Anderson
e94ff71e64 [infra] Roll back toolchain due to crasher on mac.
related #30642

Change-Id: Id1777132d4447da45eec07513406b25e9c1795b0
Reviewed-on: https://dart-review.googlesource.com/4061
Reviewed-by: William Hesse <whesse@google.com>
2017-09-07 16:14:40 +00:00
Zachary Anderson
d1b542f8cd Reland: [infra] Roll clang toolchain forward
Build spuriously worked after initial roll due to stale files hanging
around longer than they should have. This CL relands and updates
(hopefully) all the necessary paths.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3010023002 .
2017-09-01 11:15:40 -07:00
William Hesse
bf6ea50b95 Revert "[infra] Roll clang toolchain forward"
This reverts commit a60fb341f5.
The toolchain.stamp files are missing on buildbots, causing failures.
This occurred on the second run after the commit, indicating that
perhaps the files are no longer created, or something.

BUG=
R=mkroghj@google.com
CC=zra@google.com

Review-Url: https://codereview.chromium.org/3009983002 .
2017-09-01 14:42:35 +02:00
Zach Anderson
a60fb341f5 [infra] Roll clang toolchain forward
This is to match the version used by Flutter.

R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/3005903002 .
2017-08-31 21:49:02 -07:00
Zach Anderson
783f1e8c04 [infra] Remove dependency on gyp
R=rmacnak@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/3003433002 .
2017-08-18 08:51:40 -07:00
Zach Anderson
48d99f550e [infra] Remove dependence on //third_party/gyp/pylib/gyp/win_tool.py
This CL removes another dependence on gyp by using/updating scripts
that have the same function in the chromium build.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3002853002 .
2017-08-17 14:13:52 -07:00
Zach Anderson
3e16939be7 [infra] Remove dependence on //third_party/gyp/pylib/gyp/mac_tool.py
This is a step toward removing //third_party/gyp

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2997103002 .
2017-08-17 12:53:41 -07:00
Zachary Anderson
63b9312e1b Invoke copy_tree.py only once to collect all input file lists.
fixes #30105

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2992353002 .
2017-08-09 11:14:01 -07:00
Zach Anderson
0394d3a0cf [infra] Begin removing gyp
This CL begins removing gyp from Dart's tree.

Removing gyp will go in three stages:
1. Remove unused .gyp and .gypi files.
2. Translate *_sources.gypi files to *_sources.gni files
3. Remove //third_party/gyp from DEPS

This CL is stage 1.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2992593002 .
2017-08-04 22:19:35 -07:00
Zachary Anderson
1a8174b08d Exclude Observatory assets from PRODUCT build dart, dart_precompiled_runtime
This CL also removes some compiler flags that increase space somewhat
that help the profiler find symbols, which isn't included in a PRODUCT
build.

Before:
zra@zach:~/dart/sdk$ ls -la out/ProductX64/exe.stripped/
-rwxr-x--- 1 zra eng  9693064 Jun 29 14:52 dart
-rwxr-x--- 1 zra eng  7391080 Jun 29 14:52 dart_precompiled_runtime

R=askesc@google.com, rmacnak@google.com

After:
-rwxr-x--- 1 zra eng  6809424 Jun 29 15:11 dart
-rwxr-x--- 1 zra eng  3299120 Jun 29 15:11 dart_precompiled_runtime
Review-Url: https://codereview.chromium.org/2964133002 .
2017-06-30 08:09:37 -07:00
Erik Corry
029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Alexander Aprelev
8cd713bed3 Introduce dart_host_toolchain argument for generate_patch_sdk.gni. This allows for Flutter build to make sure that host_toolchain used for patched_sdk generation word size matches target platform.
Flutter Dart in product configuration doesn't allow --checked option. So remove '--checked' from invocation.

R=rmacnak@google.com

BUG:https://github.com/flutter/flutter/issues/10841
Review-Url: https://codereview.chromium.org/2944103003 .
2017-06-22 12:41:31 -07:00
Zachary Anderson
ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Ryan Macnak
14ec8fa979 Use assembly instead of C array literals to link the core snapshot into the VM.
Allows for including instructions.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2901163002 .
2017-05-24 14:38:15 -07:00
Zachary Anderson
821d31f54c [GN] Fix up arguments to nm
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2899713003 .
2017-05-22 15:39:31 -07:00
Zachary Anderson
34f601a8db Fix ARMv6 Linux cross-build
related #29676

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2892413002 .
2017-05-22 13:15:33 -07:00
Zach Anderson
61b6525c0b [mac] Use the host platform's strip command
The strip command from the clang toolchain is mangling the binary somehow

Review-Url: https://codereview.chromium.org/2895853003 .
2017-05-22 11:34:34 -07:00
Zachary Anderson
81e428fd39 [infra] Assembles the SDK using GN rather than create_sdk.py
This has a few advantages:
- We can track dependencies more precisely
- ninja can assemble things in parallel as they're ready rather than
  sequentially all at once.
- It is easier to customize SDKs depending on target platform, e.g.
  Fuchsia.

This CL also has a number of cleanups:
- Defining is_fuchsia and is_fuchsia host so we don't always have to check
- Piping through toolchain overrides in more places
- Fixing bugs in copy_tree.py, not using list_files.py, which is broken on Windows

related #29558

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2848943003 .
2017-05-20 23:30:09 -07:00
Terry Lucas
f27144d7b5 Roll 50: Updated for push to origin/master.
TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2875773003 .
2017-05-10 18:16:51 -07:00
Zach Anderson
726732dd6b [infra] Roll clang to match the version used by Flutter
Flutter uses the same clang toolchain as Fuchsia. This CL puts Dart
on that toolchain, as well. This roll should entail no changes to
glibc version requirements on Linux.

The Fuchsia buildtools distribute clang-format with the toolchain
rather than separately, so this CL introduces forwarding scripts
that are copied to the right place under //buildtools.

This CL sets the default for the number of workers in //tools/gn.py
to 1, as the newer GN version fails occasionally when run
concurrently with other invocations.

As Flutter does, this CL uses the clang toolchain to build for
Android. Thus, it is now possible to build for Android on MacOS.

This change is a prerequisite for assembling the SDK in GN
rather than with a python script:

https://codereview.chromium.org/2848943003/

and will be nicer for making prebuilt SDKs for Fuchsia.

Resubmitting this with the following fixes:
1. Rolls further forward to get past a GN bug
2. Fixes the Android build.
3. Style cleanups in gn.py

Review-Url: https://codereview.chromium.org/2858873005 .
2017-05-06 21:45:00 -07:00
Zachary Anderson
ab422ad194 Revert "[infra] Roll clang to match the version used by Flutter"
This reverts commit 6bf2c800fd.

There is still some strangeness with the new GN binary not wanting
to do an incremental build on top of a build that used an old GN
binary.

Review-Url: https://codereview.chromium.org/2861903002 .
2017-05-03 15:56:21 -07:00
Zachary Anderson
6bf2c800fd Reland: [infra] Roll clang to match the version used by Flutter
Flutter uses the same clang toolchain as Fuchsia. This CL puts Dart
on that toolchain, as well. This roll should entail no changes to
glibc version requirements on Linux.

The Fuchsia buildtools distribute clang-format with the toolchain
rather than separately, so this CL introduces forwarding scripts
that are copied to the right place under //buildtools.

This CL sets the default for the number of workers in //tools/gn.py
to 1, as the newer GN version fails occasionally when run
concurrently with other invocations.

As Flutter does, this CL uses the clang toolchain to build for
Android. Thus, it is now possible to build for Android on MacOS.

This change is a prerequisite for assembling the SDK in GN
rather than with a python script:

https://codereview.chromium.org/2848943003/

and will be nicer for making prebuilt SDKs for Fuchsia.

Review-Url: https://codereview.chromium.org/2855283002 .
2017-05-03 15:42:46 -07:00
Zachary Anderson
958c25c1db Revert "[infra] Roll clang to match the version used by Flutter"
This reverts commit cc968ca45b.

This CL will have to be relanded in two pieces so that the
update to tools/gn.py lands before the unmodified version
can invoke the updated GN binary.

Review-Url: https://codereview.chromium.org/2855973006 .
2017-05-03 15:16:21 -07:00
Zachary Anderson
cc968ca45b [infra] Roll clang to match the version used by Flutter
Flutter uses the same clang toolchain as Fuchsia. This CL puts Dart
on that toolchain, as well. This roll should entail no changes to
glibc version requirements on Linux.

The Fuchsia buildtools distribute clang-format with the toolchain
rather than separately, so this CL introduces forwarding scripts
that are copied to the right place under //buildtools.

This CL sets the default for the number of workers in //tools/gn.py
to 1, as the newer GN version fails occasionally when run
concurrently with other invocations.

As Flutter does, this CL uses the clang toolchain to build for
Android. Thus, it is now possible to build for Android on MacOS.

This change is a prerequisite for assembling the SDK in GN
rather than with a python script:

https://codereview.chromium.org/2848943003/

and will be nicer for making prebuilt SDKs for Fuchsia.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2854583002 .
2017-05-03 14:50:59 -07:00
Zach Anderson
ef2dad515a [GN] Fix prebuilt sdk detection on Windows
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2849273002 .
2017-05-01 14:41:03 -07:00
Erik Corry
aa6353b6da Dart SDK Spelling b, c, and d.
R=kmillikin@google.com
BUG=

Review-Url: https://codereview.chromium.org/2850783002 .
2017-05-01 08:28:10 +02:00
Erik Corry
4b9bba55b4 Stoppp using trippple consonants
R=ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2833073002 .
2017-04-21 17:50:13 +02:00
Zachary Anderson
f1c7a22c43 [infra] Fixes for cross-toolchains
toolchain_prefix was not correctly propagated everywhere it needed to
go. This CL also adds an error to build.py if someone tries to use
--toolchain as it is not supported there.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2797303005 .
2017-04-06 15:03:26 -07:00
Martin Kustermann
4e34234c28 Add support for configurable -OX optimization levels for debug builds
Can be used via -dX or --debug-opt-level=X, e.g.

  tools/gn.py --mode=debug --arch=x64 -d0

R=vegorov@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2645323002 .
2017-01-24 17:36:37 +01:00
Ryan Macnak
4f598c584d GN: Fix cross ARM64 and cross MIPS builds.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2643583002 .
2017-01-20 15:44:24 -08:00
Zachary Anderson
5580693fa8 GN: Add back -fPIC for a few things
Review-Url: https://codereview.chromium.org/2640923005 .
2017-01-20 14:37:50 -08:00
Zachary Anderson
17fa9d47b2 GN: Only use -fPIC where needed
R=hausner@google.com

Review-Url: https://codereview.chromium.org/2642283003 .
2017-01-20 13:40:19 -08:00
Zachary Anderson
e890ffc3e9 Fuchsia: Add -Wl,-z,origin for host link
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2640493002 .
2017-01-17 10:05:12 -08:00
Ryan Macnak
ccd6cc7fc5 Change GN debug builds to use -O2, which is the value used by GYP.
Running the language tests in debug mode, I got the following times
GYP -O2 1:50
GN -O1 4:48
GN -O2 1:55

R=zra@google.com

Review-Url: https://codereview.chromium.org/2614003003 .
2017-01-09 09:09:40 -08:00
Zachary Anderson
b5b563c52b Make gn_run_binary.py do the right thing for compiled_action
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2494853002 .
2016-11-11 08:29:51 -08:00
Zachary Anderson
f6de158e15 Quick fix to gn_run_binary.py to fix Fuchsia build.
Review URL: https://codereview.chromium.org/2496673002 .
2016-11-10 13:10:03 -08:00
Zachary Anderson
90d3962ca3 Don't depend on dart_bootstrap if there is a usable prebuilt sdk
Also replace invoke_dart() with compiled_action(), and some other
cleanups.

fixes #27781

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2493833002 .
2016-11-10 11:16:24 -08:00
Zachary Anderson
c4e1b1c641 GN: Don't strip binary with clang on x64
Review URL: https://codereview.chromium.org/2494563002 .
2016-11-09 15:00:44 -08:00
Zachary Anderson
7b86880b01 GN: Add an option to build against the Debian wheezy sysroot
Set the environment variable DART_USE_WHEEZY to build against
the wheezy sysroot on Linux.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2476343004 .
2016-11-07 13:09:45 -08:00
Jan-Hendrik Dolling
89560c68a0 change "the the" to the 2016-10-28 21:47:50 +02:00
Zachary Anderson
8169499ef8 GN: Format more gn files
Missed these on the first pass.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2454703004 .
2016-10-27 04:25:34 -07:00
Zachary Anderson
c1313a5ec7 Format GN files and add a presubmit check that GN is properly formatted
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2451613005 .
2016-10-26 08:50:54 -07:00
Zachary Anderson
1ed9dc3ac0 GN: Fix arm cross build to match gyp build
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2456463003 .
2016-10-26 07:58:42 -07:00
Zach Anderson
b6ea87c444 [windows] Make most file_win.cc functions use malloc for string conversions.
They have been using Dart_ScopeAllocate(), which makes them impossible
to use outside of a scope.

Also turn on inlining in the GN Debug windows build to match the gyp build
and speed things up a bit.

R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2439173002 .
2016-10-21 14:55:37 -07:00
Zach Anderson
71a84cfed6 GN: Fix Debug flags. Fix Windows build.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2425043002 .
2016-10-17 12:58:24 -07:00
Zachary Anderson
4ab6c33d9a Enable GN ASAN builds for Linux
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2392403002 .
2016-10-05 13:43:29 -07:00
Zachary Anderson
eabd4ed9fb Improvements to tools/gn.py
This change enables gn.py to take comma separated lists of modes,
architectures, and os's similar to build.py. It also accepts 'all'
for each of these just like build.py. GN is invoked in parallel to
save time.

This change also adds an option --gn to build.py to invoke ninja
instead of the usual build system.

Will investigate invoking tools/gn.py automagically from build.py in
a future change.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2392603005 .
2016-10-04 19:49:14 -07:00
Zachary Anderson
292a7d21ef Removes files from //build that we don't need
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2392643003 .
2016-10-04 09:45:16 -07:00
Zach Anderson
9a6797e6ba GN build on windows
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2385643004 .
2016-10-04 09:19:07 -07:00
Zach Anderson
eb451292f9 Enable GN build on Mac.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2382653003 .
2016-09-29 14:09:40 -07:00
Zachary Anderson
7c784cea9f Linux create_sdk GN build for host
This CL enables GN builds of all targets from dart.gyp
on Linux for the host (i.e. ia32, x64).

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2379803002 .
2016-09-29 13:23:00 -07:00
Zachary Anderson
3b6f3f3969 Roll buildtools forward and fix GN build for it.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2378223002 .
2016-09-28 13:03:47 -07:00
Zachary Anderson
27784381b2 Add tcmalloc to GN build
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2367723004 .
2016-09-23 15:24:54 -07:00
Zachary Anderson
7e1b7e54d7 Starting work on full GN build
This change:
- Sucks in gn binaries
- Sucks in a version of llvm that the GN build likes
- Adds tools/gn.py to invoke gn
- Adds a root BUILD.gn and .gn file
- Removes chrome boilerplate we don't need
- etc.

This lets us do a standalone build of the 'runtime'
target for x64, ia32, arm, arm64, mips, and the
simulators on Linux, and arm and arm64 on Android.

It does not include tcmalloc, and hasn't been tested
on Mac or Windows. That work and more cleanup of
chrome boilerplate will come in follow-up CLs.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2350583002 .
2016-09-23 07:47:36 -07:00
John McCutchan
36af9946c5 Add a snapshot of flutter/engine/src/build to our sdk
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2101243005 .
2016-07-01 11:09:28 -07:00