Commit graph

108 commits

Author SHA1 Message Date
Stevie Strickland 4afb45f5b8 Change default target to "create_sdk".
Currently the "all" target can lead to build errors and is unsupported,
so fall back to a supported target instead.

Change-Id: I925a785e4b81ab92e99c3842cb81c338c5a1d990
Reviewed-on: https://dart-review.googlesource.com/c/87403
Auto-Submit: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2018-12-17 18:09:07 +00:00
Ryan Macnak 49e521c55b [build] Forward load limit from build.py to Ninja.
Change-Id: I8d217147aa8273e8434ee5c4eefbd6266f5a3fec
Reviewed-on: https://dart-review.googlesource.com/77487
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-02 00:40:03 +00:00
Zach Anderson defd68e431 [infra] Don't run generate_buildfiles.py during gclient hooks
There is a race with downloading the prebuilt Dart SDK from CIPD
introduced by:

647e1e79eb

If the prebuilt Dart SDK isn't there, then generate_buildfiles.py will
fail. Instead check whether generate_buildfiles.py should be run
right before we try to build.

Change-Id: I1e25e5280075f9d1c7d96877602617ddfb40291e
Reviewed-on: https://dart-review.googlesource.com/77160
Reviewed-by: Jonas Termansen <sortie@google.com>
2018-09-28 18:11:07 +00:00
Zach Anderson b4004f6476 [vm] Reland: Move the interpreter under a flag.
After this CL, the interpreter is included by default in the
JIT VM under the flag --enable-interpreter.

Reland with fix to NativeArgument setup in simulator_arm.cc

Change-Id: Ib9b4df6eb4d997dfbe361188b8a127828c1d9c6f
Reviewed-on: https://dart-review.googlesource.com/74003
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-07 19:25:31 +00:00
Zach Anderson 21406f576a Revert "[vm] Move the interpreter under a flag."
This reverts commit 715ab7b30b.

Reason for revert: simarm and kernel precomp builds failing

Original change's description:
> [vm] Move the interpreter under a flag.
> 
> After this CL, the interpreter is included by default in the
> JIT VM under the flag --enable-interpreter.
> 
> Change-Id: I06458f20288d67981822788ee6e867c2127ebdd3
> Reviewed-on: https://dart-review.googlesource.com/71800
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,zra@google.com,asiva@google.com,regis@google.com

Change-Id: I3622f4dbe53288d07fc21b34ee5ff68f2682b36d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/74001
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-07 17:14:21 +00:00
Zach Anderson 715ab7b30b [vm] Move the interpreter under a flag.
After this CL, the interpreter is included by default in the
JIT VM under the flag --enable-interpreter.

Change-Id: I06458f20288d67981822788ee6e867c2127ebdd3
Reviewed-on: https://dart-review.googlesource.com/71800
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-09-07 16:46:07 +00:00
Zach Anderson d0510501d2 [build] Add -a kbc for interpreter
This CL adds support to build.py and test.py for building/testing
a VM with the interpreter on x64, e.g.:

$ ./tools/gn.py -m release -a x64 --bytecode
$ ./tools/build.py -m release -a x64 --bytecode runtime
$ ./tools/test.py -m release -a x64 -r vm -c dartkb language_2

Change-Id: I956d23790636609d4a2e71129481fcbd7afef9a0
Reviewed-on: https://dart-review.googlesource.com/65206
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-07-17 21:51:41 +00:00
Ben Konyi e35ed9c749 [ VM / Build ] Added '--no-include-kernel-service' to build.py. By default, the kernel service is now included in all build modes, including product mode. Providing '--no-include-kernel-service' will build the specified configuration without the kernel service.
Change-Id: I682cd7c2895a9bcb215948615f2bdc627abe8d08
Reviewed-on: https://dart-review.googlesource.com/56286
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-23 20:35:53 +00:00
Zach Anderson 3ac1ee9150 [infra] Removes ninja.py
build.py was only forwarding to ninja.py, so this CL just copies
ninja.py over build.py and removes ninja.py.

Change-Id: I7b13c8fb17dbc05825c35b3d806cd950bf1b953e
Reviewed-on: https://dart-review.googlesource.com/51520
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-17 17:05:27 +00:00
Zachary Anderson 734beef062 [infra] Translate _sources.gypi files to _sources.gni files
Also deletes code that becomes dead as a result.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2996903002 .
2017-08-14 21:54:36 -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
Zachary Anderson 467dad857e Adds deprecation messages for MIPS cross-builds
fixes #29678

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2899803002 .
2017-05-22 13:35:23 -07:00
Ryan Macnak 98d31056a7 Change build.py to be like ninja.py and only use a single GN/Ninja invocation to cross-build the SDK. This step alone would fix #29580. This breaks cross-building the SDK with GYP.
Remove hack in bin/snapshot_utils.cc that avoided building a true app-jit snapshot for ARM, ARM64 and MIPS because of the multiple invocations above.

Add GN flags to choose to build script snapshots instead of app-jit snapshots, avoiding a slow training run inside a simulator.

Fixes #29580.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2871713002 .
2017-05-08 13:06: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
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
Zachary Anderson cf069d2dfa Make build.py ensure that goma is started if it is enabled
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2620113002 .
2017-01-10 15:09:34 -08:00
William Hesse 4e6ac19b3c build.py should only use target 'All' on xcode
BUG=
R=leafp@google.com, ahe@google.com

Review-Url: https://codereview.chromium.org/2622543002 .
2017-01-09 13:21:02 +01:00
Zachary Anderson 632b744046 GN: Make GN the default
Ryan landed a fix for #28200 so we can try to land this again.

Tests on Debug builds will be slower until

https://codereview.chromium.org/2614003003/

lands, but we didn't notice an uptick in bot timeouts when we tried
this before, so I suspect the bots will continue to be unaffected.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2617803003 .
2017-01-06 15:35:54 -08:00
Zachary Anderson 02447e5b80 Revert "GN: Make GN the default"
This reverts commit ca864e93a1.

Reverting for unforseen failures in dart2js testing.

Review-Url: https://codereview.chromium.org/2599673004 .
2016-12-22 13:43:01 -08:00
Zachary Anderson ca864e93a1 GN: Make GN the default
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2592153002 .
2016-12-22 12:10:27 -08:00
Zachary Anderson 566ed7ff55 GN: Fix armsimdbc target. Add armsimdbc64
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2596333002 .
2016-12-22 10:24:24 -08:00
Zachary Anderson 9c77f4af2f GN: Pass a better -j option when using goma
When using goma, we can pass a big -j to ninja.

R=asiva@google.com, floitsch@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2559303002 .
2016-12-09 22:11:55 -08:00
Zachary Anderson 22ff72161f GN: Remove bogus argument to gn.py
Review URL: https://codereview.chromium.org/2507463002 .
2016-11-15 07:59:41 -08:00
Ryan Macnak e109c9bb0e Change build.py to invoke gn with '--check' to match the build bot's script and Flutter's usage.
R=zra@google.com

Review URL: https://codereview.chromium.org/2449503002 .
2016-10-25 09:43:37 -07:00
Zachary Anderson c67bd01d76 Select GN build with an environment variable
Setting DART_USE_GN to anything will cause 'gclient runhooks' and
build.py to use GN.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2400493002 .
2016-10-05 14:07:22 -07:00
Zach Anderson 5d01fb8458 Fix GN build.py for Windows
Review URL: https://codereview.chromium.org/2386103007 .
2016-10-05 09:44:59 -07:00
Zachary Anderson ff7ad2a4e1 Run GN from build.py if the output directory doesn't exist
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2397623003 .
2016-10-05 09:16:17 -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 a274332ed7 Remove Fuchsia build from the gyp build
This isn't used anymore. The build happens in the Fuchsia tree using GN.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2194223002 .
2016-08-01 12:38:11 -07:00
Zachary Anderson fe2b7b35c4 DBC: Enables unboxed doubles
This CL enables unboxed doubles for simdbc64. Unboxed
doubles are stored in regular dbc registers, which are
really 64-bit stack slots. It also implements binary
and unary double operations and comparisons.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2120703002 .
2016-07-14 16:05:20 -07:00
Zachary Anderson a503570e3a Fuchsia: Initial check-in.
Instructions to build and run are in README.fuchsia.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2117593002 .
2016-07-01 12:42:05 -07:00
Vyacheslav Egorov 43dc5c223d Introduce a new ARMSIMDBC configuration.
This allows us to build dart binary with SIMDBC for non-Android ARM devices.

We are going to use it to measure performance.

BUG=http://dartbug.com/26421
R=zra@google.com

Review URL: https://codereview.chromium.org/1967613002 .
2016-05-10 20:06:54 +02:00
Ryan Macnak d7234da230 Include DBC in the "all" architecture.
R=zra@google.com

Review URL: https://codereview.chromium.org/1949423003 .
2016-05-05 15:19:58 -07:00
Zachary Anderson 3d7202bad3 DBC: Adds simdbc64 target, adds arm64 arithmetic overflow logic
There were differences between linux gcc, android gcc,
MacOS clang, and 32 vs. 64-bit w.r.t the __builtin
functions for detecting arithmetic overflow. I couldn't get
them all working at the same time. Instead, I removed them,
and changed to always use the inline assembly. This works
in all the configurations above.

This change also adds a simdbc64 target for building simdbc
for 64-bit, and sets up the android targets. simdbc targets
arm, and simdbc64 targets arm64. You can build them with:

$ ./tools/build.py -m release -a simdbc{64} --os=android runtime

R=iposva@google.com

Review URL: https://codereview.chromium.org/1904153003 .
2016-04-25 12:48:34 -07:00
Vyacheslav Egorov ee0f608ce4 Dart Byte Code interpreter.
This version is Clang/GCC only and does not support Windows because it uses computed goto's.

Only unoptimized mode is supported.

Architecture is described in constants_dbc.h and stack_frame_dbc.h.

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

Review URL: https://codereview.chromium.org/1858283002 .
2016-04-18 23:02:01 +02:00
Zachary Anderson 7a2512540a Build for Android x64
This change adds standalone VM build targets for x64 Android.

Build with, e.g.:

./tools/build.py -m debug -a x64 --os=android runtime

R=iposva@google.com

Review URL: https://codereview.chromium.org/1762043002 .
2016-03-03 14:04:52 -08:00
Ryan Macnak 33752c55fc Update tools/build.py --mode=all to include product.
(Product mode added in 9c0c6cb5c2212fd53a1f57dee6c968410c61fcd2.)

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1679873002 .
2016-02-08 10:48:03 -08:00
Ivan Posva 9c0c6cb5c2 Add product mode:
- Add PRODUCT define and build mode to gyp configurations.
- Add product mode to test harness.
- Start to unify list of flags.
- Allow flags to be constant for particular build configurations.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1663863002 .
2016-02-03 21:10:30 -08:00
Zachary Anderson 80f358dede Adds targets for simarmv6 and armv6
related #25562

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1624593002 .
2016-01-22 13:07:48 -08:00
Ryan Macnak 642f754219 Note that R19 is a C preserved register, fixing crash returning from the first Dart entry on Linux ARM64.
Bug was introduced by 91bc8005fe.

 - Move the Dart stack pointer from R19 (C preserved) to R15 (C volatile) so it isn't among the registers saved by the InvokeDartCode stub.
 - Set a default cross compiler for ARM64.
 - Use ARM32 instead of IA32 binary to build Observatory on ARM64 hosts.

R=regis@google.com

Review URL: https://codereview.chromium.org/1559223003 .
2016-01-07 09:30:17 -08:00
William Hesse 9aeb907f9d Observatory build should try backup method if the SDK doesn't work.
Fix up SDK for mips and arm processors on demand.

BUG=
R=iposva@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1343103002 .
2015-09-16 13:13:32 +02:00
zra@google.com 86bfd7cb30 Adds a simarmv5te build and test target.
Also:
- Removes command line flags to choose simulated arm version.
  I think we should use build targets instead, like in this change,
  to make building and testing more obvious.
- Skips pkg tests on all simulators.

R=regis@google.com, ricow@google.com

Review URL: https://codereview.chromium.org//1077823002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45181 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 20:44:43 +00:00
zra@google.com 34044a4ca8 Adds armv5 build and test target.
R=regis@google.com

Review URL: https://codereview.chromium.org//1043263002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44828 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 23:11:33 +00:00
johnmccutchan@google.com 261200c587 Build Observatory as part of runtime
Relanding https://codereview.chromium.org/810623005/

Review URL: https://codereview.chromium.org//837723004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42645 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 21:59:42 +00:00
whesse@google.com aa5a986d5d Revert "Build Observatory with runtime"
This reverts commit 76df7b3c1bf83c08d3994d61df4c9c530fadb4e5.
This commit breaks dartium compilation.

BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org//839543002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42619 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 10:07:58 +00:00
johnmccutchan@google.com 9d6ac72b46 1) Remove prebuilt Observatory sources
2) Move observatory from runtime/bin/vmservice/observatory to runtime/observatory

3) Add two tools scripts:
- tools/run_pub.py (runs pub before SDK is built)
- tools/obs_tool.py (helper for get, build, and deploy stages)

4) Build Observatory with runtime:
- pub get --offline
- pub build
- deploy

5) Build artifacts are now in standard output directory, for example, out/DebugIA32/observatory.

6) Add a new 'dart_boostrap' host target (no snapshot, no observatory) that can be used as the Dart executable to run pub when building Observatory. This is behind a build.py flag --use-bootstrap-for-observatory because:

- It is only necessary on older Linux distributions that are incompatible with the prebuilt Dart testing executable.
- running pub build with the boostrap Debug build is significantly slower.

7) Detect if the prebuilt executable doesn't work and automatically switch to the 'dart_bootstrap' executable. Also, warn the user and provide a Wiki link with more information.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//810623005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42614 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 21:26:52 +00:00