blob: ae0a72e0c483660d5d8b43396938ced49ca8e468 [file] [log] [blame]
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/rust.gni")
import("//build/rust/mixed_target.gni")
# Defines a shared_library containing both Rust and C++ code.
# See mixed_target.gni for documentation.
#
# Note that there is not currently any way for other Rust code
# to depend on Rust APIs exposed by this shared_library. We simply haven't
# set up the infrastructure to enable Rust symbols to be exported by
# a shared library yet. This likely requires a fix to:
# https://github.com/rust-lang/rust/issues/73295
template("mixed_shared_library") {
mixed_target(target_name) {
target_type = "shared_library"
forward_variables_from(invoker,
"*",
TESTONLY_AND_VISIBILITY + [ "rs_visibility" ])
forward_variables_from(invoker,
TESTONLY_AND_VISIBILITY + [ "rs_visibility" ])
}
}
set_defaults("mixed_shared_library") {
configs = default_shared_library_configs
}