1# Copyright 2023 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16 17import("$dir_pw_build/rust_library.gni") 18 19# Note: In general, prefer to import target_types.gni rather than this file. 20# 21# A wrapper for GN's built-in rust_proc_macro target, this template wraps a 22# configurable target type specified by the current toolchain to be used for all 23# pw_rust_proc_macro targets. 24# 25# For more information on the features provided by this template, see the full 26# docs at https://pigweed.dev/pw_build/?highlight=pw_rust_proc_macro. 27template("pw_rust_proc_macro") { 28 pw_rust_library(target_name) { 29 forward_variables_from(invoker, "*") 30 underlying_target_type = "rust_proc_macro" 31 } 32} 33