Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Nov 25, 2025

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.

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.
@matts1
Copy link
Contributor

matts1 commented Nov 25, 2025

Tests appear to be broken, but LGTM otherwise

@armandomontanez
Copy link
Collaborator

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

@armandomontanez
Copy link
Collaborator

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

@armandomontanez armandomontanez dismissed their stale review November 25, 2025 01:39

Need to update tests/docs.

@keith
Copy link
Member Author

keith commented Nov 25, 2025

updated tests and docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants