# Copyright 2022 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/rust.gni") import("//build/rust/mixed_target.gni") # Defines a static_library containing both Rust and C++ code. See # mixed_target.gni for documentation. # # Note that the rustc concept of a static library (aka staticlib) differs from # this GN target type. A staticlib includes all dependencies linked into the # library. Whereas this target is a static library containing only the sources # listed for it, not its dependencies, for both the C++ and Rust parts of the # GN target. template("mixed_static_library") { mixed_target(target_name) { target_type = "static_library" forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY + [ "rs_visibility" ]) forward_variables_from(invoker, TESTONLY_AND_VISIBILITY + [ "rs_visibility" ]) } } set_defaults("mixed_static_library") { configs = default_compiler_configs }