1# Copyright 2022 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/rust.gni") 6import("//build/rust/rust_target.gni") 7 8# Template for generating a Rust proc-macro library. Such targets produce a 9# dynamic library that is loaded during compilation and used to generate Rust 10# code for compilation. 11template("rust_macro") { 12 rust_target(target_name) { 13 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY) 14 forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) 15 16 # Has rust_target generate a rust_proc_macro GN output. 17 target_type = "rust_proc_macro" 18 } 19} 20