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 15load("@rules_cc//cc:cc_library.bzl", "cc_library") 16load("@rules_cc//cc/toolchains:cc_toolchain.bzl", "cc_toolchain") 17load("@rules_cc//cc/toolchains:cc_toolchain_suite.bzl", "cc_toolchain_suite") 18load(":cc_toolchain_config.bzl", "cc_toolchain_config") 19 20package(default_visibility = ["//visibility:public"]) 21 22cc_library( 23 name = "link_extra_lib", 24) 25 26cc_library( 27 name = "malloc", 28) 29 30filegroup( 31 name = "empty", 32 srcs = [], 33) 34 35cc_toolchain_suite( 36 name = "toolchain", 37 toolchains = { 38 "%{cpu}|local": ":local", 39 "%{cpu}": ":local", 40 }, 41) 42 43cc_toolchain( 44 name = "local", 45 all_files = ":empty", 46 ar_files = ":empty", 47 as_files = ":empty", 48 compiler_files = ":empty", 49 dwp_files = ":empty", 50 linker_files = ":empty", 51 objcopy_files = ":empty", 52 strip_files = ":empty", 53 toolchain_config = ":local_config", 54 toolchain_identifier = "local", 55) 56 57cc_toolchain_config(name = "local_config") 58