Commit graph

183 commits

Author SHA1 Message Date
Alexander Aprelev e479049467 [build] Use Fuchsia windows clang toolchain
Change-Id: Ie04039c736f40174cc45a61aa637a88fa53d9024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201862
Reviewed-by: Alexander Thomas <athom@google.com>
2021-06-23 07:33:56 +00:00
Ryan Macnak 7def42c489 Reland "[infra] Update to a clang with libc++.a for Mac ARM64."
Adjust Android build.

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

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

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

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

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

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

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

TEST=Manual review of the changed markdown files.

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

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

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

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

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

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

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

TEST=Manually tested common user journeys.

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

TEST=vm/cc/BitField_Assert

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

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

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

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

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

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

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

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

Reason for revert: does not actually work

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reason for revert: Causes timeouts in some Flutter Fuchsia tests

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reason for revert: Relanding with fix

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id: If78184aecf13578617570478cbf158276981e25d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120747
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-10-09 03:16:50 +00:00