From d3d83e639cde6ad8165cd3ec40e5ef626f25a245 Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Thu, 15 Feb 2024 14:09:37 +0000 Subject: [PATCH] [vm] Do not bundle dart.lib in the Dart SDK Users of our standalone embedders we distribute in the Dart SDK should be using `dart_api_dl.h` (and initialize it from the `dart:ffi`s `NativeApi.initializeApiDLData`) If there's any API functions missing, we can add them. Though we should not Dart C API symbols that are only relevant for embedders. It requires a custom embedder implementation (which is outside the scope of what we distribute in Dart SDK) Issue https://github.com/dart-lang/sdk/issues/40579 TEST=ci Change-Id: I6f3842668c59a5dd6fefc6857581995501b9b0e0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352820 Reviewed-by: Slava Egorov --- BUILD.gn | 5 ++++- runtime/bin/BUILD.gn | 12 ------------ tests/standalone/standalone_kernel.status | 4 ---- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 5e89e28f305..22078180b94 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -42,7 +42,6 @@ group("runtime") { deps = [ "runtime/bin:dart", - "runtime/bin:entrypoints_verification_test", "runtime/bin:ffi_test_dynamic_library", "runtime/bin:ffi_test_functions", "runtime/bin:process_test", @@ -52,6 +51,10 @@ group("runtime") { "utils/dartdev:dartdev", "utils/kernel-service:kernel-service", ] + if (!is_win) { + # The test isn't run on windows + deps += [ "runtime/bin:entrypoints_verification_test" ] + } # This flag is set in runtime/runtime_args.gni # The analyze_snapshot tool is only supported on 64 bit AOT builds running diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index 18b35480f49..5ca79ec53eb 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -1049,12 +1049,6 @@ shared_library("entrypoints_verification_test") { # The only effect of DART_SHARED_LIB is to export the Dart API. "DART_SHARED_LIB", ] - if (is_win) { - # TODO(dartbug.com/40579): This wrongly links in dart.exe on precompiled. - libs = [ "dart.lib" ] - abs_root_out_dir = rebase_path(root_out_dir) - ldflags = [ "/LIBPATH:$abs_root_out_dir" ] - } } shared_library("ffi_test_dynamic_library") { @@ -1065,12 +1059,6 @@ shared_library("ffi_test_dynamic_library") { # The only effect of DART_SHARED_LIB is to export the Dart API. "DART_SHARED_LIB", ] - if (is_win) { - # TODO(dartbug.com/40579): This wrongly links in dart.exe on precompiled. - libs = [ "dart.lib" ] - abs_root_out_dir = rebase_path(root_out_dir) - ldflags = [ "/LIBPATH:$abs_root_out_dir" ] - } } shared_library("ffi_test_functions") { diff --git a/tests/standalone/standalone_kernel.status b/tests/standalone/standalone_kernel.status index b9bdcea138f..154cf897fc0 100644 --- a/tests/standalone/standalone_kernel.status +++ b/tests/standalone/standalone_kernel.status @@ -7,7 +7,6 @@ io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence. [ $system == android ] -entrypoints_verification_test: Skip # Requires shared objects which the test script doesn't "adb push". io/http_ban_http_embedder_test: Skip # Requires http server bound to non-loopback; not provided by system. io/http_ban_http_normal_test: Skip # Requires http server bound to non-loopback; not provided by system. @@ -93,9 +92,6 @@ io/web_socket_test: Skip # Flaky. map_insert_remove_oom_test: Skip # Heap limit too low. no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled -[ $builder_tag == crossword || $compiler != dartk && $compiler != dartkp || $compiler == dartkp && $system == windows ] -entrypoints_verification_test: SkipByDesign # Requires VM to run. Cannot run in precompiled Windows because the DLL is linked against dart.exe instead of dart_precompiled_runtime.exe. Cannot run in cross-word environment as native extension is not built. - [ $compiler != dartk || $runtime != vm ] check_for_aot_snapshot_jit_test: SkipByDesign # Test relies on paths, requires JIT test environment.