1# Copyright 2024 The Bazel Authors. All rights reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://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, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14"""All providers for rule-based bazel toolchain config.""" 15 16load( 17 "//cc/toolchains/impl:collect.bzl", 18 "collect_args_lists", 19) 20load(":cc_toolchain_info.bzl", "ArgsListInfo") 21 22def _cc_args_list_impl(ctx): 23 return [collect_args_lists(ctx.attr.args, ctx.label)] 24 25cc_args_list = rule( 26 implementation = _cc_args_list_impl, 27 doc = "A list of cc_args", 28 attrs = { 29 "args": attr.label_list( 30 providers = [ArgsListInfo], 31 doc = "The cc_args to include", 32 ), 33 }, 34 provides = [ArgsListInfo], 35) 36