Commit graph

40 commits

Author SHA1 Message Date
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
Alexander Aprelev 29c590dcd2 [infra] Update python2 to python3 run_binary_size_analysis script.
Fixes https://github.com/flutter/flutter/issues/80727

Change-Id: Id8c2c649c89c8e0710be9b7f9635d5aa0b800879
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196022
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2021-04-19 20:14:38 +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
Franklin Yow 40441c9685 Update LICENSE
Changes to comply with internal review

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

GitOrigin-RevId: 65ec4580e5b01658ddcb86b6a4c9301a482236ab
Change-Id: Icf2b758f8df81240758b9a0aaf11c3e6756fa574
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194340
Reviewed-by: Alexander Thomas <athom@google.com>
2021-04-08 07:57:10 +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
Nate Bosch 55f81f2210 Mass format python with yapf
- 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>
2019-08-05 20:34:31 +00:00
Ryan Macnak 611dbeb387 [vm, fuchsia] Fix deps and stop suppressing -fvisibility=hidden.
Linking on Fuchsia is more constrained because libdart is a shared library on Fuchsia and a static library everywhere else.

Change-Id: If97385ee0b23b6ed75abd28b14dae5de123915f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100625
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-29 23:31:27 +00:00
Ryan Macnak 7d462b12b9 [vm, fuchsia] Add back -fvisibility=hidden suppressions.
Some targets still rely on implicit symbol exports.

This partially reverts commit e7175ac2ed.

Change-Id: I6dc585e6f15012882348dca11571d964c2b6f7c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100723
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-29 18:46:49 +00:00
Ryan Macnak e7175ac2ed [vm, fuchsia] Consume specialized symbols for the Dart VM's profiler.
Bug: FL-238
Change-Id: Ie5e2786aeb47063ea1c534b2169b2547d6693a96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100200
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-24 19:53:35 +00:00
Ryan Macnak 971f4845d7 [build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations.
Change some static_libraries to source_sets to make ODR violations link-time errors.

This is needed to enable (stop suppressing) -fvisibility=hidden in Fuchsia product builds.

Change-Id: I699cec8d4b516beab9cebf9db0a522a7ff99e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99822
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-22 20:15:43 +00:00
Zachary Anderson 9ab8b55663 [gn] Split target arch/os defines from dart_config
This is a baby-step towards building an SDK targeting the host arch
during a cross-build. This will require a similar update to the use
of dart_config in the Flutter engine at //flutter/lib/io/BUILD.gn:19.

Change-Id: I8b871cceb53038cab8407264664c5ce545e6e010
Reviewed-on: https://dart-review.googlesource.com/17523
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-31 17:33:13 +00:00
Zach Anderson 0394d3a0cf [infra] Begin removing gyp
This CL begins removing gyp from Dart's tree.

Removing gyp will go in three stages:
1. Remove unused .gyp and .gypi files.
2. Translate *_sources.gypi files to *_sources.gni files
3. Remove //third_party/gyp from DEPS

This CL is stage 1.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2992593002 .
2017-08-04 22:19:35 -07:00
Ryan Macnak dd996fc4be [fuchsia] Make symbols in the Dart VM visible, so they are available to the profiler.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2946123002 .
2017-06-20 15:21:07 -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 2fb5d08102 Spelling a
R=ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2841543002 .
2017-04-24 14:53:51 +02: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
Ivan Posva 890c86251a - Add binary size analysis tool from Chromium.
BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1754443002 .
2016-03-01 10:06:07 -08:00
Ryan Macnak e8a3292620 Update double-conversion and reapply NO_LINTs.
Fixes a -Werror=strict-overflow in gcc 5.2.1.

56a04575a4

BUG=http://dartbug.com/25630
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1658343002 .
2016-02-02 14:30:03 -08:00
Daniel Andersson c3a9aa21d6 error can shift more than 32 bits.
From upstream fix:
0d25506a2e

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1239493002 .
2015-07-13 08:50:37 -07:00
iposva@google.com 320b0e5541 - Remove JSCRE from the runtime.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44987 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 23:59:23 +00:00
zra@google.com 9c352e0898 Moves BUILD.gn config from root to runtime.
Cannot checkout a single file from svn through gclient.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41677 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:59:00 +00:00
zra@google.com b4d3762221 Adds GN build files for building in GN based projects.
Review URL: https://codereview.chromium.org//690923003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41673 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:03:55 +00:00
zra@google.com ec1140b188 Adds support for building arm64 Android.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39844 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 23:31:51 +00:00
rmacnak@google.com ccf8156e82 Fix clang compilation error in jscre.
../../dart/runtime/third_party/jscre/pcre_internal.h:412:5: error: implicit conversion of NULL constant to 'int' [-Werror,-Wnull-conversion]
    ASSERT(isBracketStartOpcode(*opcodePtr) || *opcodePtr == OP_ALT);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dart/runtime/third_party/jscre/pcre_internal.h:86:72: note: expanded from macro 'ASSERT'
#define ASSERT(x) if (!(x)) *(reinterpret_cast<volatile int*>(NULL)) = NULL

BUG=http://dartbug.com/19324
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39276 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 23:19:05 +00:00
iposva@google.com 9da10a1da3 - Assertions need to "touch" their conditions to avoid errors such as:
runtime/third_party/double-conversion/src/cached-powers.cc:134:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33168 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 18:24:24 +00:00
iposva@google.com 17759bc835 - Update runtime/third_party/double-conversion to version 1.1.5.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33167 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 17:48:35 +00:00
iposva@google.com c07e740d5d - Make sure values are "used" as part of ASSERT even when compiling optimized.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28528 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 17:02:45 +00:00
iposva@google.com 83bf536748 - Fix double-increment in bignum library code.
Review URL: https://codereview.chromium.org//23757005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26881 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 17:08:12 +00:00
zra@google.com e6cf04a8bb Changes to run "Hello, world!" on MIPS hardware.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23484 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 18:41:41 +00:00
zra@google.com dae5068650 Enables cross-compilation of the VM for ARM.
Uses the "toolset" feature of gyp to build the dart VM
for ARM, but restricts building of snapshot generation
to the host machine.

For generated source files, it also changes to using
LIB_DIR instead of SHARED_INTERMEDIATE_DIR to avoid
generation of duplicate Makefile rules (gyp doesn't
know that generated source files from toolchains it
thinks are different will be the same.)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21757 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 18:05:44 +00:00
tball@google.com 3ca9ed33bc Fixed warnings reported by clang compiler.
Review URL: https://codereview.chromium.org//11823067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16982 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 19:17:28 +00:00
iposva@google.com 0b1b94c9e3 - Proper inclusion of gypi files, so that they do not override
existing build flags.
Review URL: https://chromiumcodereview.appspot.com//9701054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5505 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-15 01:07:15 +00:00
floitsch@google.com 173ffa2012 Updated to latest double-conversion library version.
Review URL: http://codereview.chromium.org//9001001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2601 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-19 23:29:37 +00:00
floitsch@google.com a8543e8bb8 Integrate double-conversion into build-process.
Review URL: http://codereview.chromium.org//8725003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1872 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 19:04:33 +00:00
floitsch@google.com 326417a3ba double-conversion drop.
Not yet integrated into build process.

Review URL: http://codereview.chromium.org//8632010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1870 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 18:38:38 +00:00
antonm@google.com cf53ea78d7 Make DartVM build with clang.
Review URL: http://codereview.chromium.org//8381037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@966 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 19:07:48 +00:00
asiva@google.com fdb5d9a607 Fix compilation warnings/errors seen with newer versions of gcc compiler.
Review URL: http://codereview.chromium.org//8222017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@321 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-11 00:37:11 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00