Commit graph

197 commits

Author SHA1 Message Date
Alexander Thomas a100968232 [python3.12] Fix syntax warnings in utils.py scripts
Bug: https://github.com/dart-lang/sdk/issues/54306
Change-Id: I3abfac0765721246b59451152d322a111d685644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346022
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2024-01-12 16:38:51 +00:00
Ryan Macnak 1256db2277 [build] Python 3.12 compatibility.
Bug: https://github.com/dart-lang/sdk/issues/54306
Change-Id: I974e5e70c6c1cbb87343139a26052996d8df858f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341023
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-12 18:19:35 +00:00
Ryan Macnak e4849d852c [build] Handle riscv64 hosts in utils.py.
Bug: https://github.com/dart-lang/sdk/issues/48545
Change-Id: I7439b644ab4ff2fcbc5e22553392b93ebcfc6435
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340645
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-11 19:12:50 +00:00
Jonas Termansen df654c584f Remove obsolete checked-in SDK logic.
Change-Id: Ic92f68717a84b431fc271f6cd1bb1c4f70ea6135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327869
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-09-28 10:49:23 +00:00
Jonas Termansen a97b977148 Reland "Forward compatibility for renaming the be channel to main."
Delete lots of dead code in bot_utils and utils. The logic has been
migrated into the recipes for a long time already or has otherwise
become obsolete.

This second version restores IncreasedNumberOfFileDescriptors which was
accidentally deleted while still in use.

Bug: b/270022416
Change-Id: Iea3a607663886c24ea7e0d19ea2a8a615f40ec31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327867
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-09-27 14:27:40 +00:00
Daco Harkes 0fdd69ac6e Revert "Forward compatibility for renaming the be channel to main."
This reverts commit 90300b9ca1.

Reason for revert: A bunch of purple bots mentioning:
`NameError: name 'IncreasedNumberOfFileDescriptors' is not defined`.

Original change's description:
> Forward compatibility for renaming the be channel to main.
>
> Delete lots of dead code in bot_utils and utils. The logic has been
> migrated into the recipes for a long time already or has otherwise
> become obsolete.
>
> Bug: b/270022416
> Change-Id: I7977c7a0d129e6112ad143f10f554aec7d9f653f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326780
> Commit-Queue: Jonas Termansen <sortie@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: b/270022416
Change-Id: I3b008eeb2c729fce4e9abc5879c91d2416dfa692
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327960
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-09-26 15:11:41 +00:00
Jonas Termansen 90300b9ca1 Forward compatibility for renaming the be channel to main.
Delete lots of dead code in bot_utils and utils. The logic has been
migrated into the recipes for a long time already or has otherwise
become obsolete.

Bug: b/270022416
Change-Id: I7977c7a0d129e6112ad143f10f554aec7d9f653f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326780
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-09-26 12:52:03 +00:00
Ryan Macnak 32977d8f43 [infra] Setup Windows ARM64.
Change-Id: I6a9c5beba0ec909b75a463de04586787068fdbcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303424
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-06-02 18:18:09 +00:00
Lauren N. Liberda 0ba6f0637b recognize armv8l host as arm
Bug: https://github.com/dart-lang/sdk/issues/52290
Change-Id: I24185ca2a17133f32473f3e81323bc3389c0c8f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301900
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-05-08 08:13:17 +00:00
William Hesse 9466e8d53d [infra] Fix version ordering in release scripts
The prerelease_patch number was being compared before the prerelease
number in the version comparison.

Change-Id: I77cc46d07912ffdbe321ee9d855f928452572a5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-04-14 12:27:01 +00:00
Ryan Macnak ec8688d97a Reland "[build] Don't combine stdout and stderr when consuming git output."
Ignore non-zero exit code during GetGitRevision.

Bug: https://github.com/flutter/flutter/issues/123416
Bug: https://github.com/dart-lang/sdk/issues/51865
Change-Id: Ifff7251d478cfd742a60ba6dcdeb60e581279b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291300
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-27 18:02:38 +00:00
Alexander Aprelev 7aaad727fa Revert "[build] Don't combine stdout and stderr when consuming git output."
This reverts commit 1ac8b374a2.

Reason for revert: Broken debianpackage bot https://ci.chromium.org/p/dart-internal/builders/ci/debianpackage-linux-main/4682

Original change's description:
> [build] Don't combine stdout and stderr when consuming git output.
>
> When the alternate objects path is broken, `git log -n1 --pretty=format:%cd` will output `error: unable to normalize alternate object path: .git/objects/no/such/path` to stderr, and we don't want this mixed into the version string.
>
> Bug: https://github.com/flutter/flutter/issues/123416
> Change-Id: Ief03e57febd5a42f5cbba2b14a736d949a90ae82
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291050
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

Bug: https://github.com/flutter/flutter/issues/123416
Change-Id: If100a66a7b94a2c540aa9e4f28902ce6f6ab8d64
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291056
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-03-25 04:37:43 +00:00
Ryan Macnak 1ac8b374a2 [build] Don't combine stdout and stderr when consuming git output.
When the alternate objects path is broken, `git log -n1 --pretty=format:%cd` will output `error: unable to normalize alternate object path: .git/objects/no/such/path` to stderr, and we don't want this mixed into the version string.

Bug: https://github.com/flutter/flutter/issues/123416
Change-Id: Ief03e57febd5a42f5cbba2b14a736d949a90ae82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291050
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-24 22:00:11 +00:00
Jonas Termansen 48219d6378 [infra] Promote beta to stable when stable is ahead of beta.
Don't promote older releases to latest if promoted out of order.

Fixes: b/227744513
Change-Id: I954c8620897e59ed3caa459e0bd22e446e38d02d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283622
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-02-17 11:20:20 +00:00
なつき 4486a3f45d [infra] Create a GIT_TIMESTAMP file for tarball
Closes https://github.com/dart-lang/sdk/pull/51057

GitOrigin-RevId: 2da5e4069a8d870429c89b7291b246cdf0ce2e82
Change-Id: I8e4b76f532387ac4b7a153dc23e84fc8562f11f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279278
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-02-06 09:15:01 +00:00
Jonas Termansen b803fb036f [portability] Recognize amd64 as x64.
The BSD systems report amd64 in uname instead of x64.

Change-Id: I49a11059a1cb80ca05b47fc6c9bafa2f2d41579b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279096
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-01-17 12:30:27 +00:00
Josh Soref b48dc3af7a Spelling tools
Closes https://github.com/dart-lang/sdk/pull/50773

GitOrigin-RevId: 8f729bf80cce3c39b788a61591f14db234297186
Change-Id: I5a07bf96a2f8920560983fda504000c39e598e05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276560
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2022-12-21 17:26:48 +00:00
Pierrick Bouvier 1fed9b5bed build: recognize python architecture for Windows on Arm ("ARM64")
Closes https://github.com/dart-lang/sdk/pull/49611

GitOrigin-RevId: 93ba2c7c4975f45969d3d68eecab020659d1c64e
Change-Id: I73973eec8b635ef6e43e2c4d786ad8b128e4bfe3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253905
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-08-08 16:08:30 +00:00
Ryan Macnak 4f7bb16cc5 [vm] Add a stub simx64.
This allows building gen_snapshot with host=arm64, target=x64.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/103386
Change-Id: I478cc0917462896de9b598455d2ed68401323b50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252962
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-07-29 18:11:01 +00:00
Ryan Macnak eb458cf46a [build] Fix false detection of compressed pointers as cross builds.
Broken by 3c01efcbb0.

TEST=fuzzer
Change-Id: Ifefdd1864de969b82f10471f4184c1169ec9aaba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244741
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-05-16 20:22:25 +00:00
Ryan Macnak 3c01efcbb0 Reland "[build] Fix Android build for ARM64 Mac."
Account for simarm_x64 in TargetCpuForArch.

TEST=local
Bug: https://github.com/dart-lang/sdk/issues/48792
Change-Id: I820cb49ee8925c50196cb2472266f9e248c9089d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243642
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-05-10 16:11:53 +00:00
Ryan Macnak 5f1bda06ee Revert "[build] Fix Android build for ARM64 Mac."
This reverts commit b50396740f.

Reason for revert: vm-kernel-precomp-linux-debug-simarm_x64

Original change's description:
> [build] Fix Android build for ARM64 Mac.
>
> TEST=local
> Bug: https://github.com/dart-lang/sdk/issues/48792
> Change-Id: Ia43dd46f90ef5f592e324bb889c20c221f69998a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241102
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=whesse@google.com,rmacnak@google.com,dacoharkes@google.com

Change-Id: I0cfdb5653dff7675afdb005df0c37f7560b26ee3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/48792
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-20 23:13:29 +00:00
Ryan Macnak b50396740f [build] Fix Android build for ARM64 Mac.
TEST=local
Bug: https://github.com/dart-lang/sdk/issues/48792
Change-Id: Ia43dd46f90ef5f592e324bb889c20c221f69998a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241102
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-20 17:15:48 +00:00
Ryan Macnak c9d2394c02 [infra] Remove references to unsupported ARMv6 and ARMv5TE.
Change-Id: I2fb2f438940866333c7d34d26f7eb4c447b25a95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237624
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-03-17 00:07:54 +00:00
Alexander Thomas 5317e4c605 [infra] Fix architecture detection on M1/arm64 macs
Change-Id: I678054cbe27965cd552020ebc73fecebc6c6224d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237422
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2022-03-16 10:12:43 +00:00
Ryan Macnak 04ba20aa98 [vm] Support RISC-V.
Implements a backend targeting RV32GC and RV64GC, based on Linux standardizing around GC. The assembler is written to make it easy to disable usage of C, but because the sizes of some instruction sequences are compile-time constants, an additional build configuration would need to be defined to make use of it.

The assembler and disassembler cover every RV32/64GC instruction. The simulator covers all instructions except accessing CSRs and the floating point state accessible through such, include accrued exceptions and dynamic rounding mode.

Quirks:
  - RISC-V is a compare-and-branch architecture, but some existing "architecture-independent" parts of the Dart compiler assume a condition code architecture. To avoid rewriting these parts, we use a peephole in the assembler to map to compare-and-branch. See Assembler::BranchIf. Luckily nothing depended on taking multiple branches on the same condition code set.
  - There are no hardware overflow checks, so we must use Hacker's Delight style software checks. Often these are very cheap: if the sign of one operand is known, a single branch is needed.
  - The ranges of RISC-V branches and jumps are such that we use 3 levels of generation for forward branches, instead of the 2 levels of near and far branches used on ARM[64]. Nearly all code is handled by the first two levels with 20-bits of range, with enormous regex matchers triggering the third level that uses aupic+jalr to get 32-bits of range.
  - For PC-relative calls in AOT, we always generate auipc+jalr pairs with 32-bits of range, so we never generate trampolines.
  - Only a subset of registers are available in some compressed instructions, so we assign the most popular uses to these registers. In particular, THR, TMP[2], CODE and PP. This has the effect of assigning CODE and PP to volatile registers in the C calling convention, whereas they are assigned preserved registers on the other architectures. As on ARM64, PP is untagged; this is so short indices can be accessed with a compressed instruction.
  - There are no push or pop instructions, so combining pushes and pops is preferred so we can update SP once.
  - The C calling convention has a strongly aligned stack, but unlike on ARM64 we don't need to use an alternate stack pointer. The author ensured language was added to the RISC-V psABI making the OS responsible for realigning the stack pointer for signal handlers, allowing Dart to leave the stack pointer misaligned from the C calling convention's point of view until a foreign call.
  - We don't bother with the link register tracking done on ARM[64]. Instead we make use of an alternate link register to avoid inline spilling in the write barrier.

Unimplemented:
 - non-trivial FFI cases
 - Compressed pointers - No intention to implement.
 - Unboxed SIMD - We might make use of the V extension registers when the V extension is ratified.
 - BigInt intrinsics

TEST=existing tests for IL level, new tests for assembler/disassembler/simulator
Bug: https://github.com/dart-lang/sdk/issues/38587
Bug: https://github.com/dart-lang/sdk/issues/48164
Change-Id: I991d1df4be5bf55efec5371b767b332d37dfa3e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217289
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-20 00:57:57 +00:00
Clement Skau 14d5ca1721 [tools] Change CoreDumpArchiver to not default throw
This prevents missing core dumps from crashing bots a la:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8846992204042276416/+/u/vm_tests_shard_1/task_stdout_stderr:_vm_tests_shard_1

Bug: https://github.com/dart-lang/sdk/issues/36469
Change-Id: If66e40d8cb2df7ece7c1274fbbdcbffda445056d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200865
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-05-20 11:49:16 +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
Ryan Macnak be7bea72dc [infra] Add new compressed architectures to the test matrix.
This merely makes the architectures known to test.py; it does not create new bots.

TEST=ci
Change-Id: Icd50eb3b09c7eeadec796d5154226bba5cacf227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182665
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-02-04 17:44:37 +00:00
Liam Appelbe f7eaaf2ce1 [vm] Build configs for compressed pointers
Change-Id: Ied0f17b2c314ce7e0b5e70989684b95b8e506ffc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181442
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-01-28 23:15:15 +00:00
Liam Appelbe 79cec0e864 [vm] Delete ABI infrastructure
Change-Id: I26d455d96c87010293a6dcb9f6c0eecfcaf3c816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157102
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-06 19:55:12 +00:00
Martin Kustermann 90bba3ae27 [vm] Ensure SDK hash is correctly embedded for CFE and other tools that produce Kernel
The missing --short=10 was causing (depending on git version and
configuration) us to sometimes default to using '0000000000'.

Furthermore the build rules were missing two places where -Dsdk_hash has
to be set.

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

Change-Id: I83dbfcce677e2594074c1139093bd9592d4fa3ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154684
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-07-16 18:43:24 +00:00
Clement Skau 0ce83987d6 Reland "[SDK] Adds an SDK hash to kernels and the VM."
Note: This is a reland of https://dart-review.googlesource.com/c/sdk/+/150343

Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

This also bumps the min. and current ABI version.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I2f85945045a603eb9dcfd1f2c0d0d024bd84a956
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152802
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-07 06:08:20 +00:00
Clement Skau 34dbe66e7d [SDK] Clean up tools/utils.py. Style; Py2/3 compatible;
- Imports __future__.print_function to make printing consistent and
  robust across Python versions.
- Removes do-nothing os.path.join()s.
- Replaces all " with ' for consistency.
- Further gathers all "consts" and helpers at the top.
- Replaces old-style modulo formatting operator with new-style .format().
- Removes redundant if-return-else-return patterns for readability.
- Parameterises several subprocess cwd instead of hardcoded values.
  This should make it easier to use with other paths (g3 builds).
- Adds decode()'ing to process output to convert bytes to strs.
  This stops json.dump crashing in Py3. As well as Golem crashing in gn.
- Style, formatting, etc., etc.

Change-Id: I2bd7136aa18b12c4b18d9260f1539f16630065a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152842
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-06-30 13:22:30 +00:00
Clement Skau 46bd867651 [SDK] Clean up tools/utils.py. Order consts, helpers.
This refactoring is being done to make it easier to integrate
this code into internal builds.

It has the added benefit of cleaning up some really wonderful code.

Change-Id: I30f22785cc1f3dec00e01fb809115344284375c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152840
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-06-29 15:05:23 +00:00
asiva bb8d145616 Revert "[SDK] Adds an SDK hash to kernels and the VM."
This reverts commit edde575dcd.

Reason for revert: Breaks the Dart to Flutter roll and golem

Original change's description:
> [SDK] Adds an SDK hash to kernels and the VM.
>
> Adds a new SDK hash to kernels and the VM which is optionally checked
> to verify kernels are built for the same SDK as the VM.
> This helps catch incompatibilities that are currently causing
> subtle bugs and (not so subtle) crashes.
>
> The SDK hash is encoded in kernels as a new field in components.
> The hash is derived from the 10 byte git short hash.
>
> This new check can be disabled via:
>   tools/gn.py ... --no-verify-sdk-hash
>
> This CL bumps the min. (and max.) supported kernel format version,
> making the VM backwards incompatible from this point back.
>
> Bug: https://github.com/dart-lang/sdk/issues/41802
> Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,jensj@google.com,cskau@google.com

Change-Id: I34cc7d378e2babdaaca4d932d19c19d0f35422fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/41802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152703
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-26 18:54:17 +00:00
Clement Skau edde575dcd [SDK] Adds an SDK hash to kernels and the VM.
Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-26 13:35:42 +00:00
Liam Appelbe 4f1294e495 Fix bug in utils.py, causing SDK bots to fail
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8877199214187649920/+/steps/upload_sdk/0/stdout

Change-Id: I08d70c64d8ea17645c5071f58aeafd0d81073137
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151780
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 18:21:36 +00:00
Liam Appelbe 764e72800f Reland "Revert "Add an --os=fuchsia option to build.py:""
This reverts commit d39d4d0d55.

Reason for revert: Relanding with fix

Change-Id: I6d6911b6cdc578a3b576b237db94c7f1db9824b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151600
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 00:24:31 +00:00
Leaf Petersen d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
George Wright d39d4d0d55 Revert "Add an --os=fuchsia option to build.py:"
This reverts commit 4ce18ab931.

Reason for revert: bad merge, caused build breakages in flutter/engine

Original change's description:
> Add an --os=fuchsia option to build.py:
> 
> tools/build.py --os=fuchsia runtime create_sdk
> 
> This is analogous to --os=android. It cross compiles from Linux x64 to
> Fuchsia.
> 
> A lot of the build rules are just slightly different between the existing
> Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
> example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
> So to support this I had to add a new variable, using_fuchsia_gn_sdk,
> analogous to using_fuchsia_sdk. Flutter will need to set this to false.
> 
> Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com,kaushikiska@google.com,matthewcarroll@google.com

Change-Id: If01ee34eba906c55f2d56ba650748a86e81e701c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151321
Auto-Submit: George Wright <wrightgeorge@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-06-15 23:01:53 +00:00
Liam Appelbe 4ce18ab931 Add an --os=fuchsia option to build.py:
tools/build.py --os=fuchsia runtime create_sdk

This is analogous to --os=android. It cross compiles from Linux x64 to
Fuchsia.

A lot of the build rules are just slightly different between the existing
Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
So to support this I had to add a new variable, using_fuchsia_gn_sdk,
analogous to using_fuchsia_sdk. Flutter will need to set this to false.

Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-15 20:05:16 +00:00
Alexander Thomas 1e5b0182ca [infra] Remove obsolete buildbot paths/terms
https://github.com/dart-lang/sdk/issues/42247

Change-Id: Ia0b19677c655bc768f00be77df8b0162ac9e7bea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150629
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-10 20:59:46 +00:00
asiva 03ce33f80c [BUILD] - Initial CL to unfork the NNBD Dart SDK
- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I729630a7bd36ea7ae38134f9285b44e93c283c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138902
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-05-07 21:12:47 +00:00
Siva Annamalai 726d3c7725 Revert "[BUILD] - Initial CL to unfork the NNBD Dart SDK"
This reverts commit cab69e7706.

Reason for revert: It was a temporary submit

Original change's description:
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> NOTE: This is a trial submit and will be reverted immediately.
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com

Change-Id: Ib0f99fc1a42c9c7a8b21f8542f4a35dba9105d5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144900
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-27 05:00:10 +00:00
asiva cab69e7706 [BUILD] - Initial CL to unfork the NNBD Dart SDK
NOTE: This is a trial submit and will be reverted immediately.

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-27 04:59:26 +00:00
Siva Annamalai 63a92a3b00 Revert "This is a trial submit of the unfork CL, it will be reverted immediately."
This reverts commit 393468dc89.

Reason for revert: This was a trial submit and so reverting it.

Original change's description:
> This is a trial submit of the unfork CL, it will be reverted immediately.
> This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.
> 
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I7b50fae71764eceb17893338d1981e40ea2de520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144083
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-20 03:50:49 +00:00
asiva 393468dc89 This is a trial submit of the unfork CL, it will be reverted immediately.
This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.

[BUILD] - Initial CL to unfork the NNBD Dart SDK

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-20 03:46:06 +00:00
Alexander Thomas 5900a0ac49 [beta] Move channel name to the end of the version string
This changes the version names on dev and beta from x.y.z-dev.m.n to
x.y.z-m.n.(dev|beta).

https://github.com/dart-lang/sdk/issues/41535

Change-Id: I890c38c14edf059447eb1f82afcf9da468911d6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143585
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2020-04-16 12:26:41 +00:00
Alexander Thomas 97afe8410a [beta] Support the beta channel in SDK scripts
Fixes https://github.com/dart-lang/sdk/issues/40992

Change-Id: Icc6888c94517667a184931d3e690db2fe67cc0ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139814
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-03-19 07:49:38 +00:00