Skip to content

Commit

Permalink
build: Fix config_setting targets not having a visibility set
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden committed Nov 18, 2023
1 parent 4d3a3b4 commit 1df7ad2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ test --test_verbose_timeout_warnings
# =========================================================
# See: https://docs.bazel.build/versions/main/backward-compatibility.html

build --incompatible_config_setting_private_default_visibility
build --incompatible_disallow_empty_glob
build --incompatible_enable_cc_toolchain_resolution
build --incompatible_enforce_config_setting_visibility

# Compiler configuration
# =========================================================
Expand Down
3 changes: 3 additions & 0 deletions bzl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ filegroup(
config_setting(
name = "is_clang",
flag_values = {"@bazel_tools//tools/cpp:compiler": "clang"},
visibility = ["//visibility:public"],
)

config_setting(
name = "is_clang-cl",
flag_values = {"@bazel_tools//tools/cpp:compiler": "clang-cl"},
visibility = ["//visibility:public"],
)

config_setting(
name = "is_msvc",
flag_values = {"@bazel_tools//tools/cpp:compiler": "msvc-cl"},
visibility = ["//visibility:public"],
)

0 comments on commit 1df7ad2

Please sign in to comment.