Revert "[pkg/dart2native] Add negative padding check to MachO writer." This reverts commit 161f8fd9428f83e865e238ca38691d8ef6409568. Reason for revert: breaks google3 (b/243899439) Original change's description: > [pkg/dart2native] Add negative padding check to MachO writer. > > This catches an inadvertent partial overwrite of the first section > in the `dartaotruntime` executable that happens when there's not > enough padding after the headers. The first section is a text section, > so unless there are no calls to code in this overwritten portion, there > are no runtime failures when this happens. > > However, having a MachO section which has a file offset within the > headers is checked by MachO verification code within the `codesign` > utility when run with the `-f` flag, and thus caused failures in > certain tests and builds. Note that we only use that flag when > `codesign` does not have the `linker-signed` option, which is for > MacOS versions prior to 12.0. > > Example failure with this change when this case occurs (e.g., prior to > the recent clang revert): > ``` > $ xcodebuild/ReleaseARM64/dart-sdk/bin/dart compile exe -o test test.dart > Info: Compiling with sound null safety > Error: AOT compilation failed > FormatException: The MachO header overlaps with the first 120 bytes of the section contents > ``` > > Change-Id: Ib27db910777f61b90f162f7a0bcfa4ba6592a5a0 > Bug: https://github.com/dart-lang/sdk/issues/49783 > Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-mac-product-x64-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256264 > Reviewed-by: Daco Harkes <dacoharkes@google.com> > Reviewed-by: Martin Kustermann <kustermann@google.com> > Commit-Queue: Tess Strickland <sstrickl@google.com> TBR=kustermann@google.com,dacoharkes@google.com,sstrickl@google.com Change-Id: Iccf27ffab6c6b6272e366b77c5092b346145e263 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: https://github.com/dart-lang/sdk/issues/49783 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-mac-product-x64-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256460 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com> Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com> Reviewed-by: Tess Strickland <sstrickl@google.com>
Dart is:
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.