# Copyright 2021 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/jumbo.gni") import("//build/config/rust.gni") import("//build/rust/mixed_target.gni") # Defines a component 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 component. 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_component") { mixed_target(target_name) { target_type = "component" forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY + [ "rs_visibility" ]) forward_variables_from(invoker, TESTONLY_AND_VISIBILITY + [ "rs_visibility" ]) } } set_defaults("mixed_component") { configs = default_component_configs # TODO(crbug.com/1292951): Remove this line. configs -= [ "//build/config/compiler:prevent_unsafe_narrowing" ] }