[PATCH] D137008: [Bazel] Add bzlmod support
Aaron Siddhartha Mondal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 23:43:29 PDT 2022
aaronmondal added a comment.
A few notes:
The `--registry=https://github.com/eomii/bazel-eomii-registry/commit/04d3d96f0fa35e38b056853db3bae8dd903a4bbd` line in the example is only meant for testing and should not be part of the final version of this diff.
I "delayed" the custom commit example to https://reviews.llvm.org/D137009 since it will require an LLVM commit that contains the changes in this commit.
The`utils/bazel/MODULE.bazel` file is the file used if someone (most likely a CI system) would run a bzlmod build from within a cloned version of LLVM. The MODULE.bazel file that most users will actually interact with is the one patched in by `bzlmod_compatibility_patch.patch`.
Something I'm still figuring out is how to add `WORKSPACE`, `MODULE.bazel` and `BUILD.bazel` dynamically when building in-tree. When using the `http_archive` variant the files can just be patched in, and bazel registries will have to contain a copy of `bzlmod_compatibility_patch.patch` anyways (unless we add these files to the real top level llvm-project directory, which is probably not possible). When building from within `utils/bazel`, patching may hurt reproducibility as @fmeum mentioned in a previous discussion. I'll investigate this further.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137008/new/
https://reviews.llvm.org/D137008
More information about the llvm-commits
mailing list