From e8989401d57011183642844c84edf32b43d90640 Mon Sep 17 00:00:00 2001 From: Armando Montanez Date: Thu, 3 Oct 2024 19:46:02 -0700 Subject: [PATCH] Address more comments --- examples/rule_based_toolchain/BUILD.bazel | 2 -- examples/rule_based_toolchain/dynamic_answer/BUILD.bazel | 3 +-- examples/rule_based_toolchain/static_answer/BUILD.bazel | 3 +-- examples/rule_based_toolchain/toolchain/args/BUILD.bazel | 5 +++-- examples/rule_based_toolchain/toolchain/clang.BUILD | 5 ++++- examples/rule_based_toolchain/toolchain/tools/BUILD.bazel | 3 +-- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/rule_based_toolchain/BUILD.bazel b/examples/rule_based_toolchain/BUILD.bazel index 81878e5..28103fd 100644 --- a/examples/rule_based_toolchain/BUILD.bazel +++ b/examples/rule_based_toolchain/BUILD.bazel @@ -14,8 +14,6 @@ load("@rules_cc//cc:defs.bzl", "cc_test") -package(default_visibility = ["//visibility:public"]) - licenses(["notice"]) cc_test( diff --git a/examples/rule_based_toolchain/dynamic_answer/BUILD.bazel b/examples/rule_based_toolchain/dynamic_answer/BUILD.bazel index 865ead0..7a8d640 100644 --- a/examples/rule_based_toolchain/dynamic_answer/BUILD.bazel +++ b/examples/rule_based_toolchain/dynamic_answer/BUILD.bazel @@ -14,8 +14,6 @@ load("@rules_cc//cc:defs.bzl", "cc_library", "cc_shared_library") -package(default_visibility = ["//visibility:public"]) - licenses(["notice"]) cc_library( @@ -42,5 +40,6 @@ cc_shared_library( cc_library( name = "dynamic_answer", srcs = [":shared_library"], + visibility = ["//visibility:public"], deps = [":headers"], ) diff --git a/examples/rule_based_toolchain/static_answer/BUILD.bazel b/examples/rule_based_toolchain/static_answer/BUILD.bazel index 4a13976..f185f06 100644 --- a/examples/rule_based_toolchain/static_answer/BUILD.bazel +++ b/examples/rule_based_toolchain/static_answer/BUILD.bazel @@ -14,8 +14,6 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -package(default_visibility = ["//visibility:public"]) - licenses(["notice"]) cc_library( @@ -31,4 +29,5 @@ cc_library( alias( name = "static_answer", actual = ":answer", + visibility = ["//visibility:public"], ) diff --git a/examples/rule_based_toolchain/toolchain/args/BUILD.bazel b/examples/rule_based_toolchain/toolchain/args/BUILD.bazel index 28d2325..537c6b2 100644 --- a/examples/rule_based_toolchain/toolchain/args/BUILD.bazel +++ b/examples/rule_based_toolchain/toolchain/args/BUILD.bazel @@ -15,8 +15,6 @@ load("@rules_cc//cc/toolchains:args.bzl", "cc_args") load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot") -package(default_visibility = ["//visibility:public"]) - cc_sysroot( name = "linux_sysroot", data = [ @@ -25,6 +23,7 @@ cc_sysroot( "@linux_sysroot//:usr-include-x86_64-linux-gnu", ], sysroot = "@linux_sysroot//:root", + visibility = ["//visibility:public"], ) cc_args( @@ -39,6 +38,7 @@ cc_args( "-Wextra", "-Wpedantic", ], + visibility = ["//visibility:public"], ) cc_args( @@ -48,4 +48,5 @@ cc_args( "@rules_cc//cc/toolchains/actions:cpp_compile_actions", ], args = ["-no-canonical-prefixes"], + visibility = ["//visibility:public"], ) diff --git a/examples/rule_based_toolchain/toolchain/clang.BUILD b/examples/rule_based_toolchain/toolchain/clang.BUILD index 4372dfe..24842da 100644 --- a/examples/rule_based_toolchain/toolchain/clang.BUILD +++ b/examples/rule_based_toolchain/toolchain/clang.BUILD @@ -78,5 +78,8 @@ filegroup( # binary doesn't exist. filegroup( name = "multicall_support_files", - srcs = glob(["bin/llvm"]), + srcs = glob( + ["bin/llvm"], + allow_empty = True, + ), ) diff --git a/examples/rule_based_toolchain/toolchain/tools/BUILD.bazel b/examples/rule_based_toolchain/toolchain/tools/BUILD.bazel index 9608672..1ed55ef 100644 --- a/examples/rule_based_toolchain/toolchain/tools/BUILD.bazel +++ b/examples/rule_based_toolchain/toolchain/tools/BUILD.bazel @@ -15,8 +15,6 @@ load("@rules_cc//cc/toolchains:tool.bzl", "cc_tool") load("@rules_cc//cc/toolchains:tool_map.bzl", "cc_tool_map") -package(default_visibility = ["//visibility:public"]) - licenses(["notice"]) # This `select` happens under the target configuration. For macOS, @@ -28,6 +26,7 @@ alias( "@platforms//os:macos": ":macos_tools", "//conditions:default": ":default_tools", }), + visibility = ["//visibility:public"], ) COMMON_TOOLS = {