summaryrefslogtreecommitdiff
path: root/chromium/build/rust/mixed_component.gni
blob: 7b52d8f160843e2ceb1bdde0cf0ef368ee583979 (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
# Copyright 2021 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/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
}