1*eed53cd4SHONG Yifanload("//cc:defs.bzl", "cc_flags_supplier", "cc_library", "compiler_flag") 2*eed53cd4SHONG Yifan 3*eed53cd4SHONG Yifan# Copyright 2018 The Bazel Authors. All rights reserved. 4*eed53cd4SHONG Yifan# 5*eed53cd4SHONG Yifan# Licensed under the Apache License, Version 2.0 (the "License"); 6*eed53cd4SHONG Yifan# you may not use this file except in compliance with the License. 7*eed53cd4SHONG Yifan# You may obtain a copy of the License at 8*eed53cd4SHONG Yifan# 9*eed53cd4SHONG Yifan# http://www.apache.org/licenses/LICENSE-2.0 10*eed53cd4SHONG Yifan# 11*eed53cd4SHONG Yifan# Unless required by applicable law or agreed to in writing, software 12*eed53cd4SHONG Yifan# distributed under the License is distributed on an "AS IS" BASIS, 13*eed53cd4SHONG Yifan# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*eed53cd4SHONG Yifan# See the License for the specific language governing permissions and 15*eed53cd4SHONG Yifan# limitations under the License. 16*eed53cd4SHONG Yifan# 17*eed53cd4SHONG Yifanpackage(default_visibility = ["//visibility:public"]) 18*eed53cd4SHONG Yifan 19*eed53cd4SHONG Yifanlicenses(["notice"]) # Apache 2.0 20*eed53cd4SHONG Yifan 21*eed53cd4SHONG Yifan# It is frequently necessary to constrain platforms based on the cc compiler type. 22*eed53cd4SHONG Yifanconstraint_setting(name = "cc_compiler") 23*eed53cd4SHONG Yifan 24*eed53cd4SHONG Yifanconstraint_value( 25*eed53cd4SHONG Yifan name = "clang", 26*eed53cd4SHONG Yifan constraint_setting = ":cc_compiler", 27*eed53cd4SHONG Yifan) 28*eed53cd4SHONG Yifan 29*eed53cd4SHONG Yifanconstraint_value( 30*eed53cd4SHONG Yifan name = "gcc", 31*eed53cd4SHONG Yifan constraint_setting = ":cc_compiler", 32*eed53cd4SHONG Yifan) 33*eed53cd4SHONG Yifan 34*eed53cd4SHONG Yifanconstraint_value( 35*eed53cd4SHONG Yifan name = "msvc", 36*eed53cd4SHONG Yifan constraint_setting = ":cc_compiler", 37*eed53cd4SHONG Yifan) 38*eed53cd4SHONG Yifan 39*eed53cd4SHONG Yifanconstraint_value( 40*eed53cd4SHONG Yifan name = "clang-cl", 41*eed53cd4SHONG Yifan constraint_setting = ":cc_compiler", 42*eed53cd4SHONG Yifan) 43*eed53cd4SHONG Yifan 44*eed53cd4SHONG Yifanconstraint_value( 45*eed53cd4SHONG Yifan name = "mingw", 46*eed53cd4SHONG Yifan constraint_setting = ":cc_compiler", 47*eed53cd4SHONG Yifan) 48*eed53cd4SHONG Yifan 49*eed53cd4SHONG Yifanconstraint_value( 50*eed53cd4SHONG Yifan name = "msys", 51*eed53cd4SHONG Yifan constraint_setting = ":cc_compiler", 52*eed53cd4SHONG Yifan) 53*eed53cd4SHONG Yifan 54*eed53cd4SHONG Yifancc_library( 55*eed53cd4SHONG Yifan name = "malloc", 56*eed53cd4SHONG Yifan) 57*eed53cd4SHONG Yifan 58*eed53cd4SHONG Yifanfilegroup( 59*eed53cd4SHONG Yifan name = "grep-includes", 60*eed53cd4SHONG Yifan srcs = ["grep-includes.sh"], 61*eed53cd4SHONG Yifan) 62*eed53cd4SHONG Yifan 63*eed53cd4SHONG Yifanfilegroup( 64*eed53cd4SHONG Yifan name = "empty", 65*eed53cd4SHONG Yifan srcs = [], 66*eed53cd4SHONG Yifan) 67*eed53cd4SHONG Yifan 68*eed53cd4SHONG Yifanfilegroup( 69*eed53cd4SHONG Yifan name = "bzl_srcs", 70*eed53cd4SHONG Yifan srcs = glob(["**/*.bzl"]), 71*eed53cd4SHONG Yifan) 72*eed53cd4SHONG Yifan 73*eed53cd4SHONG Yifanfilegroup( 74*eed53cd4SHONG Yifan name = "srcs", 75*eed53cd4SHONG Yifan srcs = glob(["**"]), 76*eed53cd4SHONG Yifan) 77*eed53cd4SHONG Yifan 78*eed53cd4SHONG Yifanfilegroup( 79*eed53cd4SHONG Yifan name = "interface_library_builder", 80*eed53cd4SHONG Yifan srcs = ["build_interface_so"], 81*eed53cd4SHONG Yifan) 82*eed53cd4SHONG Yifan 83*eed53cd4SHONG Yifanfilegroup( 84*eed53cd4SHONG Yifan name = "link_dynamic_library", 85*eed53cd4SHONG Yifan srcs = ["link_dynamic_library.sh"], 86*eed53cd4SHONG Yifan) 87*eed53cd4SHONG Yifan 88*eed53cd4SHONG Yifanfilegroup( 89*eed53cd4SHONG Yifan name = "lib_cc_configure", 90*eed53cd4SHONG Yifan srcs = ["lib_cc_configure.bzl"], 91*eed53cd4SHONG Yifan) 92*eed53cd4SHONG Yifan 93*eed53cd4SHONG Yifancompiler_flag(name = "compiler") 94*eed53cd4SHONG Yifan 95*eed53cd4SHONG Yifancc_flags_supplier(name = "cc_flags") 96