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# 15 16load("//cc:cc_library.bzl", "cc_library") 17load("//cc/toolchains:cc_flags_supplier.bzl", "cc_flags_supplier") 18load("//cc/toolchains:compiler_flag.bzl", "compiler_flag") 19 20package(default_visibility = ["//visibility:public"]) 21 22licenses(["notice"]) # Apache 2.0 23 24# It is frequently necessary to constrain platforms based on the cc compiler type. 25constraint_setting(name = "cc_compiler") 26 27constraint_value( 28 name = "clang", 29 constraint_setting = ":cc_compiler", 30) 31 32constraint_value( 33 name = "gcc", 34 constraint_setting = ":cc_compiler", 35) 36 37constraint_value( 38 name = "msvc", 39 constraint_setting = ":cc_compiler", 40) 41 42constraint_value( 43 name = "clang-cl", 44 constraint_setting = ":cc_compiler", 45) 46 47constraint_value( 48 name = "mingw", 49 constraint_setting = ":cc_compiler", 50) 51 52constraint_value( 53 name = "msys", 54 constraint_setting = ":cc_compiler", 55) 56 57cc_library( 58 name = "malloc", 59) 60 61filegroup( 62 name = "grep-includes", 63 srcs = ["grep-includes.sh"], 64) 65 66filegroup( 67 name = "empty", 68 srcs = [], 69) 70 71filegroup( 72 name = "bzl_srcs", 73 srcs = glob(["**/*.bzl"]), 74) 75 76filegroup( 77 name = "srcs", 78 srcs = glob(["**"]), 79) 80 81filegroup( 82 name = "interface_library_builder", 83 srcs = ["build_interface_so"], 84) 85 86filegroup( 87 name = "link_dynamic_library", 88 srcs = ["link_dynamic_library.sh"], 89) 90 91filegroup( 92 name = "lib_cc_configure", 93 srcs = ["lib_cc_configure.bzl"], 94) 95 96compiler_flag(name = "compiler") 97 98cc_flags_supplier(name = "cc_flags") 99