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>
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>
`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>
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>
`ResolveUri` in the VM works on Uris, not on paths.
Add `file://` to complete the uri with a schema, and remove `file://`
again before calling dlopen.
TEST=pkg/dartdev/test/native_assets/build_test.dart
Added a relative path run.
Closes: https://github.com/dart-lang/sdk/issues/52614
Change-Id: Ib253f530b9edecb69ba1ec2269874fdfc2693b37
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/+/307460
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
This CL introduces native assets suport for `dart run` and introduces
`dart build` which is similar to `dart compile` but outputs a folder
instead to that native assets can be bundled with an executable.
Change-Id: Ib6cfb95539f0adee46c99e531e440928c3f72f2b
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/+/267340
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>