mirror of https://github.com/bazelbuild/rules_cc
Fix licensing errors and add default condition for `local_defines`.
PiperOrigin-RevId: 548995629 Change-Id: I0734ca5b64cf37401ec74a339a67f3044321aa7c
This commit is contained in:
parent
5d8ef91731
commit
1583313f41
|
@ -43,7 +43,7 @@ simplified by extracting the select expression into a Starlark constant.
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
licenses(["notice"])
|
||||
|
||||
config_setting(
|
||||
name = "clang",
|
||||
|
|
|
@ -21,11 +21,12 @@ cc_binary(
|
|||
srcs = ["main.cc"],
|
||||
local_defines = select(
|
||||
{
|
||||
"//cc/compiler:clang": ["COMPILER=clang"],
|
||||
"//cc/compiler:clang-cl": ["COMPILER=clang-cl"],
|
||||
"//cc/compiler:clang": ["COMPILER=clang"],
|
||||
"//cc/compiler:gcc": ["COMPILER=gcc"],
|
||||
"//cc/compiler:mingw-gcc": ["COMPILER=mingw-gcc"],
|
||||
"//cc/compiler:msvc-cl": ["COMPILER=msvc-cl"],
|
||||
"//conditions:default": [],
|
||||
},
|
||||
no_match_error = "Compiler not detected by Bazel",
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue