Remove unnecessary allowlist_include_directories

This commit is contained in:
Armando Montanez 2024-10-02 15:54:03 -07:00
parent 8faacdf7e3
commit 72d3b34612
3 changed files with 21 additions and 14 deletions

View File

@ -0,0 +1,13 @@
# Rule-based toolchains
This example showcases a fully working rule-based toolchain for Linux. This also
serves as an integration test to ensure rule-based toolchains continue to work
as intended.
The complete toolchain configuration lives [here](https://github.com/bazelbuild/rules_cc/tree/main/examples/rule_based_toolchain/toolchain).
# Trying the example
From this directory, you can run example tests that build using this toolchain
with the following command:
```
$ bazel test //...
```

View File

@ -81,14 +81,11 @@ cc_tool(
"@platforms//os:windows": "//:bin/clang.exe",
"//conditions:default": "//:bin/clang",
}),
allowlist_include_directories = [
":lib-clang-include",
],
data = glob([
"bin/llvm",
"include/**",
"lib/clang/**/include/**",
]),
]) + [
":lib-clang-include",
],
)
cc_tool(
@ -97,16 +94,13 @@ cc_tool(
"@platforms//os:windows": "//:bin/clang++.exe",
"//conditions:default": "//:bin/clang++",
}),
allowlist_include_directories = [
data = glob([
"bin/llvm",
]) + [
":include-x86_64-unknown-linux-gnu-c++-v1",
":include-c++-v1",
":lib-clang-include",
],
data = glob([
"bin/llvm",
"include/**",
"lib/clang/**/include/**",
]),
)
cc_tool(

View File

@ -20,11 +20,11 @@ package(default_visibility = ["//visibility:public"])
cc_sysroot(
name = "sysroot",
allowlist_include_directories = [
data = [
":root",
":usr-include-x86_64-linux-gnu",
":usr-include",
],
data = [":root"],
sysroot = ":root",
)