From c8a782fdea28b05b44da932bb2824cfc6b3c6bfc Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Tue, 17 Oct 2023 12:10:18 +0000 Subject: [PATCH] [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 Reviewed-by: Daco Harkes --- runtime/bin/main_impl.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/bin/main_impl.cc b/runtime/bin/main_impl.cc index 47836fbb94e..3a5cbee541d 100644 --- a/runtime/bin/main_impl.cc +++ b/runtime/bin/main_impl.cc @@ -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.