Fix licensing errors and add default condition for `local_defines`.

PiperOrigin-RevId: 548995629
Change-Id: I0734ca5b64cf37401ec74a339a67f3044321aa7c
This commit is contained in:
Googler 2023-07-18 07:27:26 -07:00 committed by Copybara-Service
parent 5d8ef91731
commit 1583313f41
2 changed files with 3 additions and 2 deletions

View File

@ -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",

View File

@ -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",
),