2
0
Fork 0
mirror of https://github.com/bazelbuild/rules_cc synced 2024-11-28 21:34:00 +00:00
rules_cc/tests/rule_based_toolchain/tool/BUILD
Googler f364500ba8 Create a concept of a tool capability.
This should make the concept of "sentinel features" work correctly with known_features and enabled_features, rather than enabling them directly in features.

PiperOrigin-RevId: 681688437
Change-Id: I29184a2079ccfd0eb3a275439508a66ca61109af
2024-10-02 19:56:22 -07:00

40 lines
1.2 KiB
Python

load("//cc/toolchains:directory_tool.bzl", "cc_directory_tool")
load("//cc/toolchains:tool.bzl", "cc_tool")
load("//tests/rule_based_toolchain:analysis_test_suite.bzl", "analysis_test_suite")
load(":tool_test.bzl", "TARGETS", "TESTS")
cc_tool(
name = "tool",
src = "//tests/rule_based_toolchain/testdata:bin_wrapper.sh",
capabilities = ["//cc/toolchains/capabilities:supports_pic"],
data = ["//tests/rule_based_toolchain/testdata:bin"],
tags = ["requires-network"],
)
cc_tool(
name = "wrapped_tool",
src = "//tests/rule_based_toolchain/testdata:bin_wrapper",
visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)
cc_tool(
name = "tool_with_allowlist_include_directories",
src = "//tests/rule_based_toolchain/testdata:bin_wrapper.sh",
allowlist_include_directories = ["//tests/rule_based_toolchain/testdata:directory"],
visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)
cc_directory_tool(
name = "directory_tool",
data = ["bin"],
directory = "//tests/rule_based_toolchain/testdata:directory",
executable = "bin_wrapper.sh",
tags = ["requires-network"],
)
analysis_test_suite(
name = "test_suite",
targets = TARGETS,
tests = TESTS,
)