diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 865e716b520..8bba43823ec 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -184,6 +184,12 @@ config("dart_config") { } } +config("dart_shared_lib") { + if (dart_lib_export_symbols) { + defines = [ "DART_SHARED_LIB" ] + } +} + source_set("dart_api") { public_configs = [ ":dart_public_config" ] sources = [ @@ -204,6 +210,7 @@ library_for_all_configs("libdart") { "vm:libdart_lib", "vm:libdart_vm", ] + extra_configs = [ ":dart_shared_lib" ] include_dirs = [ "." ] public_configs = [ ":dart_public_config" ] sources = [ @@ -215,7 +222,6 @@ library_for_all_configs("libdart") { "vm/native_api_impl.cc", "vm/version.h", ] - defines = [ "DART_SHARED_LIB" ] } action("generate_version_cc_file") { diff --git a/runtime/runtime_args.gni b/runtime/runtime_args.gni index 3f5fbebb89d..23894e2c6e9 100644 --- a/runtime/runtime_args.gni +++ b/runtime/runtime_args.gni @@ -84,6 +84,9 @@ declare_args() { # Whether the VM includes the kernel service in all modes (debug, release, # product). exclude_kernel_service = false + + # Whether libdart should export the symbols of the Dart API. + dart_lib_export_symbols = true } declare_args() {