diff --git a/toolchain/extensions/llvm.bzl b/toolchain/extensions/llvm.bzl index 28148719..767ad9dc 100644 --- a/toolchain/extensions/llvm.bzl +++ b/toolchain/extensions/llvm.bzl @@ -50,10 +50,10 @@ def _constraint_dict(tags, name): def _llvm_impl_(module_ctx): for mod in module_ctx.modules: - if not mod.is_root: - fail("Only the root module can use the 'llvm' extension") toolchain_names = [] for toolchain_attr in mod.tags.toolchain: + if not mod.is_root: + fail("Only the root module can use the 'llvm.toolchain()' tag") name = toolchain_attr.name toolchain_names.append(name) attrs = {