This reverts commit 0a393f1b69.
Reason for revert: breaks dartdev on Windows
Original change's description:
> [ DDS ] Fix DDS AOT snapshot build rules
>
> dds_aot.dart.snapshot was not being generated for runtime build targets,
> and dds.dart.snapshot was being built regardless of whether or not we
> were building for an IA32 target.
>
> This change also adds a check for IA32 in 'dart run' so the "Could not
> find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message
> isn't printed when we fall back to using dds.dart.snapshot.
>
> This change also reverts 2cc08595a6, which
> failed to fix the issue it was attempting to fix.
>
> TEST=pkg/vm_service tests
>
> Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I479a026184fc1fe27926d1ab0d7d3221dec3130e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342440
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
dds_aot.dart.snapshot was not being generated for runtime build targets,
and dds.dart.snapshot was being built regardless of whether or not we
were building for an IA32 target.
This change also adds a check for IA32 in 'dart run' so the "Could not
find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message
isn't printed when we fall back to using dds.dart.snapshot.
This change also reverts 2cc08595a6, which
failed to fix the issue it was attempting to fix.
TEST=pkg/vm_service tests
Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
--suppress-analytics is implicitly set when we detect we're running in a
CI environment, but providing --{disable,enable}-analytics conjunction
with --suppress analytics was considered an error.
This change allows for --{disable,enable}-analytics to be provided when
running in a CI environment without causing a fatal error to be thrown.
Change-Id: I07fbbe7aeb8632c6f432d4feeb79d8ee3cf190c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341401
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Rev the import and fix the tests in pkg:dartdev to reflect recent refactorings.
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try
Change-Id: If3df36284b1a324cbdc94b709008891b1f3d756f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341221
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Marked as experimental, and only shown when verbose flag is passed:
```
$ dart help compile -v
Compile Dart to various formats.
Usage: dart [vm-options] compile <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
aot-snapshot Compile Dart to an AOT snapshot.
exe Compile Dart to a self-contained executable.
jit-snapshot Compile Dart to a JIT snapshot.
js Compile Dart to JavaScript.
kernel Compile Dart to a kernel snapshot.
wasm Compile Dart to a WebAssembly/WasmGC module (EXPERIMENTAL).
```
Change-Id: I6a0e65d4fbdd7b2782406b8b9969e14036bf0711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304860
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Recently commands have been hanging after completion occasionally. I couldn't find any culprit besides this and its dartdocs suggest awaiting as well.
Behavior should be covered by the increased analytics testing added with the recently unified migration.
Change-Id: I143c0bfc3648e19f528c45ebf056e5a3c7c095ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339500
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Pass which package is being run from `dart run` to native assets
builds. This means `dart run ffigen --config=ffigen.yaml` does not
need to build native assets of the root package.
Note the special treatment for `dart run test` to behave as
`dart test`: it does need the native assets for the root package.
Rolls native packages to get the new parameter.
Bug: https://github.com/dart-lang/native/issues/822
Change-Id: I7ed89b2b7251341278ee7d9cecd29924063cb0bb
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339124
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
vm.
This identifies all calls to static methods annotated with
`@ResourceIdentifier`, collects the constant arguments passed to the
method, and writes the results into a file.
The purpose of this feature is to be able to pass the recorded
information to packages in a post-compilation step, allowing them to
remove or modify assets based on the actual usage in the code prior to
bundling in the final application.
Tested: pkg/vm/test/transformations/resource_identifier_test.dart
Change-Id: I58cb313b66ee23c1d154dcc242547723a1ced359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329961
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
`dart run` and `dart build` already checked.
`dart compile` only checked if there are no native assets. However,
it should also error if native assets builds failed, as there could
have been native assets resulting from those builds.
Change-Id: Id90eb9b58675856421b793b271bf627506effe3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334223
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 5f33a9ab80.
Reason for revert: There is speculation that this CL might have caused some errors invoking the analysis server from dartdev, leading to the error "dartdev: Error: Error when reading 'dartdev': No such file or directory"
TEST=ci
Original change's description:
> [dartdev] Use an AOT snapshot for dds
>
> This change enables use of an AOT snapshot for dds execution.
>
> TEST=ci
>
> Change-Id: I500be544e168bd487745ee1232fd925d5ef546b8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327140
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Derek Xu <derekx@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
Change-Id: I33a53a17f53714d3df5aba539870574a631cd416
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327523
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Report an error if compiling to an executable and the user attempts
a cross-OS compilation, that is, the user provides a '--target-os'
argument that does not match the host OS.
For AOT snapshots, no target OS is autodetected, so the default
output is OS agnostic, and cross-OS compilation is allowed.
Add '--target-os' as a command line option to 'dart build', with
the same restrictions as 'dart compile'.
Also removes test restrictions that were added for
https://github.com/dart-lang/sdk/issues/51707, which has since
been closed.
TEST=pkg/dartdev/test/commands/compile_test
pkg/dartdev/test/native_assets/build_test
Fixes https://github.com/dart-lang/sdk/issues/53247
Change-Id: Ieb82d0d25736b0036c5579d25ca29c8834b789b7
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322341
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
The --enable-asserts option is not defined in PRODUCT mode, so
args.wasParsed(enableAssertsOption) currently reports an error saying
"Could not find an option named --enable-asserts".
Change-Id: Ic3d0695fc608ccb674141dc5b918d0bdf3dc298e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322422
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
`packge:native_assets_builder` had a number of breaking changes.
The most notable one: It now returns a data structure with a `success` boolean instead of throwing exceptions.
Also bumps Dart to 3.0 in Dartdev so we can use records.
Change-Id: Ic32d7c2dd58860883c10f42411b80e979df2a797
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318980
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>