dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.23k stars 1.57k forks source link

Add `depfile` output flags to `dart compile` #56778

Open matanlurey opened 1 month ago

matanlurey commented 1 month ago

The Dart SDK internal binaries, such as gen_snapshot support a depsfile output:

https://github.com/dart-lang/sdk/blob/a3c6d0569702e8cd5da693f0235b79dbdd38cfa7/runtime/bin/main_options.cc#L794

The Flutter tool, and Flutter engine, use this option to correctly rebuild from various build systems.

It would be nice to have this available in dart compile so that Dart SDK internal binaries are (less?) not needed.

dart-github-bot commented 1 month ago

Summary: The user requests the addition of depfile output flags to the dart compile command, similar to the functionality available in internal Dart SDK binaries like gen_snapshot. This would allow for more flexible build systems and potentially reduce reliance on internal binaries.

matanlurey commented 1 month ago

Ben to add some context to this request as well: https://github.com/flutter/flutter/issues/155769. Thanks!