From d1a3eaaa99e7cc880226c8fb1b7c948ab4e02a92 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 25 Sep 2018 23:58:57 +0000 Subject: [PATCH] Add flag to control symbol visibility of libdart Change-Id: Ib2acfaa0f7813d6aa5e9886c664e863c3f8ebf00 Reviewed-on: https://dart-review.googlesource.com/76567 Reviewed-by: Zach Anderson Commit-Queue: Zach Anderson --- runtime/BUILD.gn | 8 +++++++- runtime/runtime_args.gni | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 865e716b5203c..8bba43823ec29 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 3f5fbebb89db6..23894e2c6e932 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() {