rules_cc icon indicating copy to clipboard operation
rules_cc copied to clipboard

Remove allowlist_include_directories from data

Open keith opened this issue 1 month ago • 7 comments

When very recent versions of bazel, improvements in the merkle tree recommend that instead of passing a huge list of files to the toolchain, you instead pass the root directory of those files once, and then bazel symlinks the entire directory as opposed to every file one by one. In order to do this you must pass a filegroup pointing at only the directory. In this case, if you then also pass all the files, you get conflicts in bazel trying to link the files, and the directory. If you didn't get those conflicts you would still lose the perf benefits.

This change makes allowlist_include_directories only affect the cxx_builtin_include_directories field. If you need the directory also in data, you must now also add it to data. If you want to continue using the entire list of files, that still works fine.

keith avatar Nov 25 '25 01:11 keith

Tests appear to be broken, but LGTM otherwise

matts1 avatar Nov 25 '25 01:11 matts1

Yeah, the tests ensure cxx_builtin_include_directories add files to toolchain file groups since it was part of the API contract.

armandomontanez avatar Nov 25 '25 01:11 armandomontanez

On that note, probably deserves a documentation update to clarify any changes in behavior.

armandomontanez avatar Nov 25 '25 01:11 armandomontanez

updated tests and docs

keith avatar Nov 25 '25 02:11 keith

@armandomontanez friendly ping 🙏🏻

keith avatar Dec 03 '25 00:12 keith

Our internal CI is complaining that //docs:toolchain_api_diff_test is failing. I would assume you updated the docs in starlark, but didn't regenerate them or something?

matts1 avatar Dec 17 '25 23:12 matts1

thanks, updated

keith avatar Dec 18 '25 01:12 keith