Commit graph

54 commits

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