Commit graph

37 commits

Author SHA1 Message Date
Michael Thomsen 6c5fb84716 Discontinue dart2native (use dart compile)
TEST=Existing tests updated to use dart compile

Change-Id: Ia3478069df2354a3bf057fedae0f1eea9415de95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210241
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-08-23 20:53:09 +00:00
Alexander Markov 846af57d99 Migrate pkg/dart2native to null safety
Change-Id: I87e4fd454b8e52acc17243495295ffee9dfd79bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208986
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-08-05 17:41:30 +00:00
Devon Carew dc1804fff4 [pkg/dart2native] switch to use package:lints
Change-Id: I81f2b25cc57fc89138638eb0b98f6d5489146473
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204641
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-23 00:51:17 +00:00
Devon Carew 6862fa1408 Revert "[pkg/dart2native] upgrade dart2native to null safe"
This reverts commit b6fad9c4f3.

Reason for revert: Seeing failures in google3.

Original change's description:
> [pkg/dart2native] upgrade dart2native to null safe
>
> Change-Id: Ieef99b982bab14425a4df9f84a40d8ae1ba2bd79
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202402
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=devoncarew@google.com,bkonyi@google.com

Change-Id: Idff233978847be421f7b59ab93d04da99c02cbf5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202722
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-07 17:02:24 +00:00
Devon Carew b6fad9c4f3 [pkg/dart2native] upgrade dart2native to null safe
Change-Id: Ieef99b982bab14425a4df9f84a40d8ae1ba2bd79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202402
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-07 16:10:32 +00:00
Ryan Macnak 108fe63a20 Increase alignment when concatenating AOT runtime and ELF snapshots.
Allow for segment padding when testing that strip decreases snapshot size.

Cf. bc21edaf17.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/42773
Change-Id: Icf533b2caa756488e17856495f3877fb779d2faf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196040
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-19 22:55:39 +00:00
Alexander Markov 55daf05f4f Add --[no-]sound-null-safety option to dart2native and dart compile exe
Fixes https://github.com/dart-lang/sdk/issues/44553

Change-Id: Id461550e7761d874719220a5cb7a6b2c9ac421a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181020
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-01-26 19:16:30 +00:00
Johnni Winther 97a4280e52 [cfe,dartdev,dart2js] Add support for --verbosity option
In response to https://github.com/dart-lang/sdk/issues/44727

TEST=pkg/dartdev/test/commands/compile_test.dart

Change-Id: I56b67d9362a415acd721c1cce2f7e2232d2493df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180566
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-01-22 18:33:44 +00:00
Johnni Winther cad04f8604 [cfe,dart2js,dartdev] Show null safety mode for dart compile
This adds a new messages kind 'info' to the CFE for showing general
information during compilation. A 'configuration' options is added
to `CompilerOptions` for telling the CFE how it is run.

The configuration 'compile' is added for when the CFE is invoked to
produces an "executable" as when running `dart compile`. When
configuration is set, the CFE emits an info message about the
null safety compilation mode.

Support for `dart compile exe` and `dart compile js` is added in this
CL. Support for `dart compile kernel|app-jit|aot` is not included.

In response to https://github.com/dart-lang/sdk/issues/44234

TEST=pkg/dartdev/test/commands/compile_test.dart

Change-Id: I08f51e2a3f5ad4841c4d703bcd266b7afb63c7c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178982
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-01-15 11:28:13 +00:00
Martin Kustermann 0358e0e07a [vm/dart2native] Ensure to normalize packages path (in addition to sourceFile) to guarantee consistency
The path normalization done by dart2native for "sourceFile" can cause
lower-casing of the path. We should do the same for the "packages" path.

TEST=Makes pkg/vm_snapshot_analysis/test/precompiler_trace_test pass on
     Windows in unittest-asserts-release-win config.

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

Change-Id: I3de0f2cc33d7a30280d4e815b0b7e3588f24e4f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170093
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-04 11:13:36 +00:00
Devon Carew 059a347580 update pubspec.yaml files to reflect actual package usage
Change-Id: I44dd6f5cb69e11a65a8c2b552a54b89ebc5fa4b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159161
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-08-20 18:08:49 +00:00
Clement Skau 77ca1e0356 [SDK] Adds --enable-experiment to dart2native.
Bug: https://github.com/dart-lang/sdk/issues/42849
Change-Id: Ibde382971a6b8b296f9a0a8792f0fec0e1741286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157963
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-08-11 11:22:19 +00:00
Michael Thomsen f0c87e9f21 Clean up no-publish comments in pubspecs
Change-Id: I6cc1ab404de75cd02183b862842198c85b6d9256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152005
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-23 10:34:09 +00:00
Michael Thomsen b54a95b0bb Add a new dartdev compile verb.
Supports compiling to snapshots, JS, native executables, and kernel:

$ dart help compile
Compile Dart to various formats

Usage: dart compile <subcommand> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  aot      Compile Dart to an AOT snapshot
  exe      Compile Dart to a self-contained executable
  jit      Compile Dart to a JIT snapshot
  js       Compile Dart to JavaScript
  kernel   Compile Dart to Kernel intermediate format

Change-Id: I1143f8dd0eec6f87a8271144f92dedc1fcf82923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146806
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-23 08:33:17 +00:00
Martin Kustermann 168539d61d Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target"
The flutter engine DEPS got new icu/boringssl so this CL can safely
land and roll into engine. A small change is made in Patchset 1..3.

This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

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

Change-Id: I8d9b37acbb5eb94e44d97652f838948a946fd372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151505
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 16:12:26 +00:00
Martin Kustermann 21222b64c4 Revert "[vm] Build dart2native dependencies with the normal "create_sdk" target"
This reverts commit a88a328b7f.

Reason for revert: Auto roller hasn't rolled previous changes from
Dart yet. Those changes updated DEPS for icu/boringssl. We have to
wait with this CL until the DEPS changes have been done in the engine.

Original change's description:
> [vm] Build dart2native dependencies with the normal "create_sdk" target
> 
> This removes special logic for creating the `dart-sdk` we distribute
> which used to build release and product mode and copied some binaries
> from the latter into the former, before the SDK was actuallly ready to
> test and distribute.
> 
> This changes the GN build rules to build the necessary
> gen_snapshot/dart_precompiled_runtime product binaries during the normal
> release build.
> 
> Normally during --mode=product builds the global build config in
> //build/config/BUILDCONFIG.gn will set `-fvisibility=false`.
> 
> => Doing so results in much smaller binaries - because only explicitly
>    exported symbols are visible, the rest can be tree shaken by the linker.
> 
> Since we are building --mode=release, the `-fvisibility=false` will not
> be set. In order to set the flag for the 2 special product-mode binaries
> we need to add -fvisibility=hidden manually, in:
> 
>   * dart_product_config: Which is used for compiling VM sources.
>   * 3rd party double-conversion library
>   * 3rd party boringssl library
>   * 3rd party icu library
> 
> The upstream CLs are:
> 
>   * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
>   * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407
> 
> Issue https://github.com/dart-lang/sdk/issues/42230
> 
> Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=kustermann@google.com,zra@google.com,athom@google.com,asiva@google.com

Change-Id: Ied0f2f5b58dceb2b59bc2ac6e11e5fd717c8885e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-16 10:41:27 +00:00
Martin Kustermann a88a328b7f [vm] Build dart2native dependencies with the normal "create_sdk" target
This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

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

Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2020-06-15 15:17:35 +00:00
Michael Thomsen 873bd241dd Clarify terms for environment declerations
Fixes https://github.com/dart-lang/sdk/issues/42136

Change-Id: I53ab8d0608f0229a4e22d24e54f29a5ddf150766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149595
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-03 13:37:19 +00:00
Alexander Markov f9eb40cc79 [vm/nnbd] Migate runtime/tests/vm/dart/* tests to NNBD
This change actually migrates vm/dart/* tests to NNBD by fixing
compile-time errors and adjusting tests where needed.

vm/dart/null_float32x4_simd_ops_test and vm/dart/null_float64x2_simd_ops_test
are deleted as they are superseded by static type checks.

vm/dart/regress_40462_test.dart is a huge source code auto-generated
by fuzzer and migrating and maintaining this source doesn't have much
value, so it is deleted.

There are still failures in strong mode due to dependencies on
the packages which are not migrated yet (https://github.com/dart-lang/sdk/issues/42146).

Migrated vm/dart/null_checks_with_dwarf_stack_traces_test fails both in
weak and strong mode due to https://github.com/dart-lang/sdk/issues/42149.

Issue: https://github.com/dart-lang/sdk/issues/41314
Change-Id: I5561f1c8705ec16def0c4e0efa495d15f4ea7259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149493
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-02 22:49:09 +00:00
Vyacheslav Egorov d959f4290e [vm/compiler] Disambiguate Code names when emitting instruction sizes info.
Previously the output used scrubbed qualified names which hides some
of the information and causes names of various synthetic functions
collide. We change it to use internal qualified names instead and add
additional information for disambiguation:

- For functions this means adding a prefix for various synthetic
methods;
- For anonymous closures we add their token position;
- For types we prefix type parameters with their owner's name.

We also add a unit test covering parsing of
--print-instructions-sizes-to output.

As part of adding a test dart2native was changed to support passing
extra arguments to gen_snapshot binary.

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

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I299ab0fb5993c8af9b51246483608d1e65970d67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146581
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-05-07 12:39:27 +00:00
Robert Nystrom d9bb487ca8 Treat the expect and async_helper packages as opted in to NNBD.
This should enable strong mode tests to be fully NNBD opted in. At the
same time, legacy tests when run with the experiment off should
hopefully be able to still consume these libraries because they don't
actually use any NNBD features.

To do this, I changed the script that generates the SDK repo's package
config to not put in a language version for any package whose pubspec
has no SDK version. According to language versioning, that means the
package should be considered to be at the "current" version of the SDK
running the code.

In NNBD, that's opted in. With the experiment off, that is (presumably)
"opted out" in the sense that NNBD doesn't exist.

In order to *not* opt in some of the other packages that currently
lack SDK constraints, I put those in and pinned them to "^2.7.0" which
was what the package config script used to implicitly fill in for them.

I see a bunch of other changes in the generated package config too. The
update script probably hasn't been run in a while.

Change-Id: I55193d42eac0696a6b0105546551efa45a1f3252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144305
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-04-27 21:04:56 +00:00
Kevin Moore 489a803a07 pkg/dart2native: make it clear this package is not meant to be published
Change-Id: I132a1bd47324ba9f546af81c21c84c3f108a7797
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139220
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-03-12 17:05:06 +00:00
Teagan Strickland a003d5e69a [vm] Refactor debug info handling code into a new package.
Change-Id: Iaf944564ebbe4bdcc215166f784e949362583a69
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132281
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-01-23 10:14:17 +00:00
Martin Kustermann 635aaa8adf [vm/dart2native] Bundle product-mode vm_platform.dill with the dart-sdk and let dart2native use it
Currently we bundle only one platform file, which dart2native uses as
well as other tools. Since the platform file has annotations already
evaluated, our AOT compiler ends up including service related
functionality in the AOT snapshot.

This CL bundles the product-mode vm_platform.dill as well, which will
reduce dart2native-created apps slightly.

Change-Id: I223811b30704cde1739739d97a8ea2d34a681292
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125665
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-11-20 16:50:09 +00:00
Michael Thomsen 6f5aee9f7f Update dart2native.dart
Fixes https://github.com/dart-lang/sdk/issues/39154

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

GitOrigin-RevId: d23c2b71d9fea82ebc24a14d2709338bb5170531
Change-Id: I2061c6ff436885fd6b97367467e9d5f3183b2894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123421
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-10-31 10:39:53 +00:00
Samir Jindel afac6a3714 Re-land "[vm] Use ELF loader in dart2native."
Fixes symbol resolution on Darwin.

The original commit is in patchset 1.

Change-Id: If71e9a72b8a2f45db2591bfa45ec4018745ee2c4
Cq-Include-Trybots:luci.dart.try:dart-sdk-mac-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119646
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-03 13:40:12 +00:00
Clement Skau 6e1b479285 [SDK] Adds text wrapping and tweaks to flags for dart2native.
Usage: dart2native <main-dart-file> [<options>]

Generates an executable or an AOT snapshot from <main-dart-file>.

-D, --define=<key=value>       Set values of environment variables. To specify
                               multiple variables, use multiple options or use
                               commas to separate key-value pairs.
                               E.g.: dart2native -Da=1,b=2 main.dart

    --enable-asserts           Enable assert statements.
-h, --help                     Display this help message.
-o, --output=<path>            Set the output filename. <path> can be relative
                               or absolute.
                               E.g.: dart2native main.dart -o ../bin/my_app.exe

-k, --output-kind=<aot|exe>
          [aot]                Generate an AOT snapshot.
          [exe] (default)      Generate a standalone executable.

-p, --packages=<path>          Get package locations from the specified file
                               instead of .packages. <path> can be relative or
                               absolute.
                               E.g.: dart2native --packages=/tmp/pkgs main.dart

-v, --verbose                  Show verbose output.


Change-Id: Id4d5542a946326fb8c009643f16fa1be99c9a97e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118994
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
2019-10-03 12:06:02 +00:00
Samir Jindel d0b799f39c Revert "[vm] Use ELF loader in dart2native."
This reverts commit 98b286de21.

Reason for revert: Breaks on Mac

Original change's description:
> [vm] Use ELF loader in dart2native.
> 
> Change-Id: I58834e3626cb18830ad9f9b1b95bdfa9d1ebd040
> Cq-Include-Trybots:luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119150
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Clement Skau <cskau@google.com>

TBR=sjindel@google.com,cskau@google.com,dianamichesa@google.com

Change-Id: I61c5c36e4ccd09d91cdb58c7c87f679f02579f03
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119643
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-10-02 14:02:51 +00:00
Samir Jindel 98b286de21 [vm] Use ELF loader in dart2native.
Change-Id: I58834e3626cb18830ad9f9b1b95bdfa9d1ebd040
Cq-Include-Trybots:luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119150
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-10-02 13:42:39 +00:00
Clement Skau bb600e99e2 [SDK] Make dart2native default output .exe, not .dart.exe.
Bug: https://github.com/dart-lang/sdk/issues/38530
Change-Id: I485bfe52e82932f5e886e6b3aaee6f8b079ed91e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119146
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-30 09:13:22 +00:00
Clement Skau 41dd8b522c [SDK] Further adjusts flags for dart2native.
Based on copy discussion with kathyw@ and mit@.

Change-Id: Iac41e66a431b4fd67550bd35633baa4cc79e197e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118571
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-25 15:04:20 +00:00
Clement Skau 9afc3a9894 [SDK] Fixes flags for dart2native.
- Clarifies --packages help.
- Fixes passing of --define flags.

Change-Id: I19904084910fcf675a6a8b5c8a33b38db1a60c30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118447
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-24 13:21:29 +00:00
Clement Skau 0b7a78d0a6 [SDK] Adds dart2native --verbose.
Bug: https://github.com/dart-lang/sdk/issues/38524, https://github.com/dart-lang/sdk/issues/38525
Change-Id: Ic950fcadd328d1adeae19dd1046270fe4f4320e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118387
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-23 16:41:30 +00:00
Clement Skau f546362691 [SDK] Adds dart2exe to create standalone executables.
Tested:
  ./tools/build.py --arch x64 --mode release --verbose create_sdk copy_gen_kernel_snapshot copy_dart2aot
  ./tools/build.py --arch x64 --mode product --verbose copy_gen_snapshot copy_dartaotruntime
  cp -r out/ProductX64/dart-sdk/bin/{dartaotruntime,utils/} out/ReleaseX64/dart-sdk/bin/
  out/ReleaseX64/dart-sdk/bin/dart2native ~/src/hello_world.dart
  ~/tmp/hello_world.exe

  dart tools/bots/aot_smoke_tests.dart

  python tools/test.py -n dartkp-linux-release-x64 vm/dart/run_appended_aot_snapshot_test

Change-Id: I149fcd18405cdf0a87b8f4b4072c0f0e8f98c067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117140
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-23 12:00:08 +00:00
Sarah Zakarias 6512f5563d Revert "Revert "Add dart2native tool for building either an aot file or a stand-alone executable.""
This reverts commit 54fdd559d8.

Trying to reland this after https://dart-review.googlesource.com/c/sdk/+/115364 hopefully fixes the issue leading to the revert.

Change-Id: If3c49bea9d791aa3d569003490c1cbe8b325f2e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115705
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-05 14:46:43 +00:00
Ben Konyi 54fdd559d8 Revert "Add dart2native tool for building either an aot file or a stand-alone executable."
This reverts commit a6141ff5c9.

Reason for revert: Blocking Dart SDK -> Flutter engine roll. See logs here: https://github.com/flutter/engine/pull/11836/checks?check_run_id=210988794

Original change's description:
> Add dart2native tool for building either an aot file or a stand-alone executable.
> 
> *dart2aot has been rewritten in Dart accompanied by a trampoline script.
> *dart2exec is still missing implementation.
> 
> Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
> Commit-Queue: Sarah Zakarias <zarah@google.com>
> Reviewed-by: Clement Skau <cskau@google.com>

TBR=cskau@google.com,zarah@google.com

Change-Id: I4c5946ce0f0a66484e243b98cdcb7e2b24e2d705
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-04 00:40:20 +00:00
Sarah Zakarias a6141ff5c9 Add dart2native tool for building either an aot file or a stand-alone executable.
*dart2aot has been rewritten in Dart accompanied by a trampoline script.
*dart2exec is still missing implementation.

Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-03 09:36:50 +00:00