xref: /aosp_15_r20/external/bazelbuild-rules_cc/cc/extensions.bzl (revision eed53cd41c5909d05eedc7ad9720bb158fd93452)
1# Copyright 2018 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"""Module extension for cc auto configuration."""
15
16load("@bazel_tools//tools/osx:xcode_configure.bzl", "xcode_configure")
17load("//cc/private/toolchain:cc_configure.bzl", "cc_autoconf", "cc_autoconf_toolchains")
18
19def _cc_configure_impl(_):
20    cc_autoconf_toolchains(name = "local_config_cc_toolchains")
21    cc_autoconf(name = "local_config_cc")
22    xcode_configure("@bazel_tools//tools/osx:xcode_locator.m")
23
24cc_configure = module_extension(implementation = _cc_configure_impl)
25