Closed mering closed 8 months ago
Would it be possible to just ignore non-root tool chain calls and print a warning instead of the fail()
? This is what the Python tool chain is doing as well.
You can add dev_dependency = True
to your use_extension
and register_toolchains
calls. Then the toolchain definition in A will be ignored when building from B. If needed, B can define its own toolchain in this way.
Using dev_dependency
worked. Thanks!
I have a Bzlmod module "A" which I want to be able to build standalone but also be depended on by module "B".
If I define
in
MODULE.bazel
of both module "A" and "B", then I get the following error when compiling module "B" which depends on module "A":But if I remove it from module "A", I can no longer build module "A" correctly standalone.
How can I define the llvm_toolchain such that I can use it in both modules "A" and "B"?
Based on #235.