[vm] Ensure the standalone embedder (aka dart) passes --link_natives_lazily in AppJIT

The `gen_snapshot` binary passes `--link_natives_lazily` if
it generates AppJIT/AOT snapshots (see `runtime/bin/gen_snapshot.cc`)

=> The `dart` binary should do so as well.

TEST=ci

Change-Id: I88d69f73a38cb23d4f7482739e2e0fda3c65ecef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330760
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Martin Kustermann
2023-10-17 12:10:18 +00:00
committed by Commit Queue
parent e4bb5b608b
commit c8a782fdea
+3
View File
@@ -1297,6 +1297,9 @@ void main(int argc, char** argv) {
// so generated code should not depend on the CPU features
// of the system where snapshot was generated.
vm_options.AddArgument("--target-unknown-cpu");
#if !defined(TARGET_ARCH_IA32)
vm_options.AddArgument("--link_natives_lazily");
#endif
}
// If we need to write an app-jit snapshot or a depfile, then add an exit
// hook that writes the snapshot and/or depfile as appropriate.