Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Dec 20, 2025

Since the MODULE.bazel is not at the root of the repo, there is some
complexity on how to include this in your own bazel project using
bzlmod.

This example pulls the repo as llvm-raw, patches the MODULE.bazel
(notably putting it in the root of the repo), and then sets up the
llvm-project repository.

This isn't ideal and I'm not sure if we'd really want to use the
llvm-raw name in the BCR, but I wanted to put this up for discussion

Since the MODULE.bazel is not at the root of the repo, there is some
complexity on how to include this in your own bazel project using
bzlmod.

This example pulls the repo as llvm-raw, patches the MODULE.bazel
(notably putting it in the root of the repo), and then sets up the
llvm-project repository.

This isn't ideal and I'm not sure if we'd really want to use the
llvm-raw name in the BCR, but I wanted to put this up for discussion
@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label Dec 20, 2025
},
)

def _llvm_impl(mctx):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this configure setup needs to be callable multiple times from multiple contexts so that it can view all the repositories from the MODULE.bazel in this repo. this is virtually copied from https://github.com/cerisier/toolchains_llvm_bootstrapped/blob/a6e8188bad743b8fa05be68642edf253811fe9ac/llvm.bzl#L3-L17

the biggest implementation question is how targets should combine, in the current implementation it only respects the root repo

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

Labels

bazel "Peripheral" support tier build system: utils/bazel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants