Commit Graph

16 Commits

Author SHA1 Message Date
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
Wink Saville bbdb7860f6 [build]: Build on Arch Linux with python 2.7-3.8
This change allow builds to succeed on Arch Linux with python 2.7, 3.7.4
and 3.8. Otherwise it fails with python 3.7.4 and 3.8.

- bin_to_assembly.py

  Using ord(byte) here is an error on python 3.x use a conditional
  expression instead.

- create_archive.py

  Using ord(byte) here is an error on python 3.x use a conditional
  expression instead.

  Use `as inst` syntax which is required by 3.x

- create_string_literal.py
- gen_library_src_paths.py

  Use `as inst` syntax which is required by 3.x

- make_version.py

  print >> sys.stderr syntax is not supported by 3.x use file=sys.stderr
  and add `from __future__ import print_function`

  vmhash.update requires a string use encode('utf-8')

  versopm+cc+text.replace requires a str so use `decode`.

Test: No added tests as there are no behavioral changes.
Change-Id: Id9b0a3187d06ad2b2dce3cf2244144393caddc9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124211
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-11-10 21:09:58 +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
Matthew Dempsky 527238e008 [vm] Cleanup C99 header includes
Now that MSVC 2013 is required (commit f4824d3), we can simply use C99
headers that are provided [1]. This means we can rely on <stdint.h> to
provide intXX_t and uintXX_t types, and <inttypes.h> to provide PRIxx
macros.

[1] https://devblogs.microsoft.com/cppblog/c99-library-support-in-visual-studio-2013/

Change-Id: I0cc707907f8aca05ae543188cc01e6c50d517f5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107839
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-07-03 10:54:24 +00:00
Vyacheslav Egorov 3a37ebba9f [vm/tools] Update python scripts to avoid quadratic string concat.
Change-Id: Id675c6b804be6c4df5849ea9c0c2c1d6d3377868
Reviewed-on: https://dart-review.googlesource.com/c/88707
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-08 12:32:13 +00:00
Ryan Macnak 235a918233 [vm] Remove Dart_LoadScript, Dart_LoadLibrary, Dart_LoadSource, etc.
Change-Id: I9c19625702f1df48c03de2eb3a0f7bb581d2e0b3
Reviewed-on: https://dart-review.googlesource.com/c/79140
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-11 00:38:37 +00:00
Zach Anderson 736ddd9b0e [Observatory] Refactor observatory build to prepare for Fuchsia prebuilt
This splits create_archive.py into two steps. One that creates the .tar
and one that creates the .cc for the .tar. This way on Fuchsia, the
second step will take the prebuilt instead of building it.

Change-Id: I7f407f9e70db3135884eeeb61aa5aec3091f1fcc
Reviewed-on: https://dart-review.googlesource.com/56291
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-29 16:35:34 +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 63cb4565d7 Fuchsia: Adds a script to download the prebuild SDK
The Fuchsia world doesn't run gclient runhooks or use depot_tools so
the advice is to check in a custom script to pull the prebuilt SDK
from google storage.

R=asiva@google.com, phosek@chromium.org, rmacnak@google.com

Review URL: https://codereview.chromium.org/2541123006 .
2016-12-02 13:18:54 -08:00
Jonas Termansen 3676af3168 Ensure consistent file ordering in observatory tarball
R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/2545783002 .
2016-12-01 16:01:09 +01:00
John McCutchan cc0f297703 Compress Observatory assets
- Gzip the Observatory assets tar file before encoding into the C++ source file.

Shrinks observatory_assets.cc from ~21MB to ~4MB.

Fixes #25276

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1534523002 .
2015-12-16 12:35:58 -08:00
Ivan Posva 5805cba963 - Make sure the tar file for Observatory resources only contains
forward slashes.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1507923002 .
2015-12-07 15:27:28 -08:00
John McCutchan 60f911944b Update create_archve.py to output a uint8_t array
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1419263004 .
2015-10-28 13:58:32 -07:00
John McCutchan 25906f2144 Tweak create_archive.py to output the data as const char instead of const uint8_t
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1411543006 .
2015-10-27 13:22:50 -07:00
John McCutchan 30e77221bc Some cleanups to observatory BUILD.gn
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1416293003 .
2015-10-27 07:42:27 -07:00
John McCutchan 2844eb86ca Service isolate requests Observatory assets from embedder
- Provide a new callback to Dart_Initialize that will be called when the service isolate needs the Observatory assets
- Move asset management code out of embedder and into common dart:_vmservice
- Use the tar format as the archive format
- Add build script to generate .cc file containing the archive
- Add a simple tar parser to service isolate

This makes it possible for embedders to not bake Observatory into their executable but instead load it off disk or over the network. The standalone embedder still links Observatory into the executable.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1411853003 .
2015-10-26 07:21:23 -07:00