* 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>
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>
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>
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>
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>
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>
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>
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/1946174http://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>
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>
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>
- 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>
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>
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>
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>
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>
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 .
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 #29558R=whesse@google.com
Review-Url: https://codereview.chromium.org/2848943003 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .