[llvm] [bazel] Add MODULE.bazel (PR #164891)

Aaron Siddhartha Mondal via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 27 10:57:10 PDT 2025


aaronmondal wrote:

IIRC the tricky part was to not break the "other" workflows that are not just the local builds. I think it was something where if you pull in the bazel deps and there is a MODULE.bazel file in it already, that it broke depending on llvm as external repo. I believe the key there was the use of `inject_repo` and `new_local_repository` here https://github.com/llvm/llvm-project/pull/88927/files#diff-8ad8aa04713dfad6cd1c9a9598c24d98f7452500d917d1e6e1d6aeaac31ce611R29-R45. That PR also has extension logic that might be more or less copy-pasteable to avoid the http_archive calls in the MODULE.bazel directly. This way, omitting the repos in downstream allows for custom overrides.

(Also in that PR i had a comment mentioning `NB_BUILD` and `NB_SHARED` which were needed for the nanobind bcr file. Maybe we just need to add those options as config_settings/flags/whateveritscalledagain there? This way it would just be another configuration on the sources that nanobind dependers already have in their buildgraph.)

https://github.com/llvm/llvm-project/pull/164891


More information about the llvm-commits mailing list