https://github.com/MaskRay approved this pull request. Looks great! I don't know too much about Bazel to check the rules but the code looks reasonable. I just made some nits. https://github.com/llvm/llvm-project/pull/86879