This package contains the logic for building native assets.
This package is the backend that invokes toplevel `build.dart` scripts.
For more info on these scripts see https://github.com/dart-lang/native.
This is a separate package so that dartdev and flutter_tools can reuse
the same logic without flutter_tools having to import dartdev.
Some design decisions:
* We don't yet have `build_dependencies`, so we use the ordinary
dependency graph for ordering of native assets builds. (If there is
a cycle we refuse to run.)
Bug: https://github.com/dart-lang/pub/issues/3794
* Builds are cached based on all the configuration provided by the
caller. Environment variables are ignored in caching. This CL also
contains a unit test that invokes the build by not passing through
environment variables. However, for Windows we need to pass through
at least `SYSTEMROOT` for MSVC to run correctly. So we might need
to further explore if we can/want to lock env variables down.
Bug: https://github.com/dart-lang/native/issues/32
Bug: https://github.com/dart-lang/native/issues/33
Run tests:
```
dart tools/generate_package_config.dart && \
tools/test.py -n unittest-asserts-release-linux pkg/native_assets_builder
```
Bug: https://github.com/dart-lang/sdk/issues/50565
Change-Id: I133052d7195373e87d20924d61e1e96e3d34ce8f
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/+/300203
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Extend test_runner VMOptions support with an ability to specify
paths relative to temporary compilation directory.
// VMOptions=--foo=$TEST_COMPILATION_DIR/foo.file
The same directory will also be passed as an environment variable
to execution command.
Migrate most of the tests which used to write stuff into the SDK
root to use this feature. I am leaving vm/dart/causal/* tests
unmigrated because migrating requires time consuming manual
update of expectations (which encode raw line numbers). I have
a follow up CL which changes how these tests are written which
will make migration trivial.
Change-Id: Id53008be66de8ff18623efac27ff15750f407749
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300600
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
`python3 tools/test.py --write-results ...` fails to run if the default
directory (logs) doesn't exist. Create the directory if it doesn't
exist.
Update .gitignore with the correct default paths of logs.json and
results.json.
Change-Id: Ib1118387195c3bb30b350ef3748e66b4057c57de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269880
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
This reverts commit 92868580b4.
Reason for revert: I'm seeing failures in golem:
ninja: error: '../../third_party/dart/.dart_tool/package_config.json', needed by 'vm_outline_strong.dill', missing and no known rule to make it
Original change's description:
> Auto-generate the package_config.json file on gclient sync.
>
> Change-Id: Ibb5e548c0738e7dd0061433cf054af8336a0683b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234320
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>
TBR=lrn@google.com,devoncarew@google.com,athom@google.com
Change-Id: Ic2b7ae3feedfa064ddbbdb0b36f0e3db088bf177
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234802
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
The code has been dead for quite some time.
TEST=ci
Change-Id: Iddcb63e14e9e4d95230f006ac05da64f444f0712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190024
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
`Pointer.load` and `Pointer.store` are now extension methods which are
only available for types that are sized.
`allocate` moved to `package:ffi` instead of `dart:ffi`.
Misc: gitignore another clangd cache location.
Change-Id: Ib01ba416f2efa18638a21dd4052d9a35eeab6f4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162188
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This is a reland of b71d2d9996
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Change-Id: I73cd24455c373bcc4d0f5675af6a3b1e0f947f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Benchmarks are checked in as benchmarks/<Benchmark>/dart/<Benchmark>.dart.
This scheme is compatible with our existing benchmarking infrastructure
and will aid migrating the benchmarks with minimal breakage.
This change adds an Example benchmark to show how it is done.
The benchmarks directory is now added to the Dart benchmarking builds.
Change-Id: I25971ba3b219194fa9cfea6b938372d877477e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108414
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Add the new location where clangd stores it's index to gitignore.
Change-Id: I10381131d4adfcbbaa4f3ebf7705f5e84b47f353
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108411
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This reverts commit 524fdc13a9.
Reason for revert: I still broke flutter somehow. I got the same error. Looking into it now.
Original change's description:
> Reland "[llvm] Add initial scaffolding"
>
> This is a reland of b71d2d9996
>
> Original change's description:
> > [llvm] Add initial scaffolding
> >
> > This change adds the gclient and GN changes needed to build
> > an executable using LLVM in the Dart tree as well as a basic
> > testing framework based on llvm-lit.
> >
> > Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> > Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
> > Reviewed-by: Alexander Thomas <athom@google.com>
> > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
>
> Change-Id: Ib3cd3299ed463133616c666285f9a58fa387b5bd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107829
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
TBR=vegorov@google.com,kustermann@google.com,athom@google.com,phosek@google.com,ajcbik@google.com,jakehehrlich@google.com
Change-Id: I8b18549ec4a030518633ec7f75d2fd2ceea87256
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107837
Reviewed-by: Jake Ehrlich <jakehehrlich@google.com>
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
This is a reland of b71d2d9996
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Change-Id: Ib3cd3299ed463133616c666285f9a58fa387b5bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107829
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
This reverts commit b71d2d9996.
Reason for revert: Somehow this broke flutter because gclient doesn't seem to have generated the needed file
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com,athom@google.com,phosek@google.com,ajcbik@google.com,jakehehrlich@google.com
Change-Id: I877abfe211dc6c3efd94cc2350d028bf54df9d9f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107688
Reviewed-by: Jake Ehrlich <jakehehrlich@google.com>
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
This change adds the gclient and GN changes needed to build
an executable using LLVM in the Dart tree as well as a basic
testing framework based on llvm-lit.
Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
I didn't realize they were being gitignored across the entire SDK repo.
I'm not sure why they are ignored at all, but based on the linked bug,
I think it's only a top-level analysis_options.yaml file that would
cause problems?
This change to the .gitignore file prohibits that case while still
allowing analysis_options.yaml files in subdirectories.
I very strongly want to have an options file for test_runner to ensure
that everyone on the team keeps it "no-implicit-cast" clean.
Change-Id: I9ceac507b08a063e71e2fe39501161723651e6b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106840
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Prototype for `dart:ffi` on Linux/MacOS x64 in JIT mode.
`dart:ffi` is experimental and its API is likely to change in the future.
Progress and design decisions are tracked in https://github.com/dart-lang/sdk/projects/13
issue: https://github.com/dart-lang/sdk/issues/34452
Change-Id: Ifa4566388e42c8757f154741d11e303465ef305d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-mac-debug-x64-try, vm-kernel-asan-linux-release-x64
Reviewed-on: https://dart-review.googlesource.com/c/80124
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
This CL improves the stack traces that accompany exceptions. Whenever an
async function is entered, we remember how we got there. This is similar
in spirit to package:stack_trace but the implementation is more efficient
and memory usage can be more easily reasoned about.
Tracking causal stack traces:
- [x] Upon entry to an async function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Upon entry to an async* function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Before returning from an async function, clear the Thread's asynchronous stack trace.
- [x] After resuming an async function, load the sychronous stack trace prefix into the Thread.
- [x] Filter stack traces to remove async machinery.
Service protocol changes:
- [x] Send causal async stack trace.
Observatory changes:
- [x] Display causal async stack trace below async functions.
Fixes https://github.com/dart-lang/sdk/issues/27661R=asiva@google.com, rmacnak@google.com
Comparisons: https://docs.google.com/a/google.com/document/d/10r6jEqr8OCiDZ4y9SYU_uOimcHiOGAZMly2ghTErALI/edit?usp=sharing
Review-Url: https://codereview.chromium.org/2646443005 .
Made a number of optimizations to reduce load time from 8 secs to 1 sec. The changes involved:
- No longer dynamically generate patch files on startup for dart:* libraries (created from WebKits IDL e.g., html, svg, web_audio, web_gl, indexed_db, web_sql). Instead create a cache of patch files.
- Comparison of @JS refelctedType not by library and symbol name comparison.
- In addition, a VM mirror change see CL https://codereview.chromium.org/1834673003/ gives us the remaining speedup.
This cache of interop patch files, for Dartium only, requires a manual re-gen after go.sh run is:
> cd tools/dom/scripts
> run go.sh
The steps after (for Dartium) are:
1. build Dartium
2. cd tools/dartium
3. run generate_patches.sh
4. build Dartium
R=jacobr@google.com, alanknight@google.com
Review URL: https://codereview.chromium.org/1833373002 .