Skip to content

Commit

Permalink
Add flag to control symbol visibility of libdart
Browse files Browse the repository at this point in the history
Change-Id: Ib2acfaa0f7813d6aa5e9886c664e863c3f8ebf00
Reviewed-on: https://dart-review.googlesource.com/76567
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
  • Loading branch information
goderbauer authored and commit-bot@chromium.org committed Sep 25, 2018
1 parent 86430cb commit d1a3eaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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 = [
Expand All @@ -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") {
Expand Down
3 changes: 3 additions & 0 deletions runtime/runtime_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d1a3eaa

Please sign in to comment.