-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bazel] Add filegroup for builtin_headers #67757
base: main
Are you sure you want to change the base?
Conversation
@jathu I saw you were touching the same area |
Why can't you directly use the outs of the genrule? |
I could. It would require the following change on my side:
This seems more brittle, it will break with your PR. Also that genrule takes 17 seconds in my setup to copy the files around, which is a waste since I'm just going to package them up anyway. I'd probably stick with my local patch in that case. Any reason not to add this? |
Oh I guess I misread and it won't change with your PR, I would probably need to update to use the const though. Either way, I think the point is the filegroup is simpler and faster. |
Do you think you will still need this once we land #67626? The clang-tidy binary will have the header files as runfiles, which you can just package directly
No, I don't see any reason not to add this. I assumed the filegroup was redundant since the genrule would cache the subsequent uses anyways |
I'm building the entire tar package within Bazel and I'm not packaging clang-tidy (you don't need it for a minimal toolchain) so I don't think it helps.
I think something about my compilation setup is non-hermetic, because when executing from a github actions runner (with RBE/remote caching) I am seeing tons of remote misses. When running from a minimal docker image on my laptop (also against RBE) I am seeing everything cached, so I suspect we are somehow leaking the repo path, which is probably randomized on github. Anyway, this is a total aside, but the caching doesn't work as well as I'd like :) |
I'd like to package these files into a distribution tar as part of https://github.com/dzbarsky/static-clang. I'm currently applying patches to the llvm repo but figured this bit could be upstreamed.
(Also open to ideas what to do about the
config.bzl
change in https://github.com/dzbarsky/static-clang/blob/master/llvm.patch - it's needed to link with musl libc)