blob: f3619980ad1bcd49a488da447210b0edd9bfd8c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# 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" ]
}
|