Commit Graph

5 Commits

Author SHA1 Message Date
Googler 66613ac5d9 Add support for implicit include directories to rule-based toolchains
BEGIN_PUBLIC

Add support for implicit include directories to rule-based toolchains

Reorients the `cc_toolchain.cxx_builtin_include_directories` attribute so it is expressed as an attribute on `cc_args` and `cc_tool` to signify that the tools or arguments imply include directories that Bazel's include path checker should allowlist. This moves the allowlist to the source of truth that implies these directories.

END_PUBLIC

PiperOrigin-RevId: 671393376
Change-Id: Ide8cae548783726835168adcd3f705028a1f4308
2024-09-05 09:06:15 -07:00
Googler 0069837ab5 Create a cc_directory_tool rule.
BEGIN_PUBLIC
Create a cc_directory_tool rule.

This should allow for easy definition of tools from the sysroot. For example:
cc_directory_tool(
  name = "clang",
  directory = "@sysroot//:sysroot",
  executable = "usr/bin/clang",
)
END_PUBLIC

PiperOrigin-RevId: 639947945
Change-Id: I4c211eb9c0b5fdc6457d9d32ef9250b5384a4ef3
2024-06-03 16:24:27 -07:00
Googler 2351aa42b1 Make toolchains use directory markers instead of strings.
BEGIN_PUBLIC
Make toolchains use directory markers instead of strings.

You now refer to this instead of a string containing the repo mapped path.
END_PUBLIC

PiperOrigin-RevId: 639946886
Change-Id: I409be7b7002252b06562a2982a2568e79811877d
2024-06-03 16:20:34 -07:00
Googler 916074ec32 BEGIN_PUBLIC
Implement cc_tool
END_PUBLIC

PiperOrigin-RevId: 609307150
Change-Id: I2e135a59e06a56ca8ec071254d340ac4b984b234
2024-02-22 03:06:06 -08:00
Googler 35fe45e91b BEGIN_PUBLIC
Implement cc_args.

Also change cc_flag_set / cc_flag_group to cc_args / cc_arg_group. This is to lean into the idea that this is roughly equivalent to ctx.actions.args()
END_PUBLIC

PiperOrigin-RevId: 608804069
Change-Id: I74ea883b14219f904aaafc4eab902b96a1fb3e3d
2024-02-20 17:58:39 -08:00