[Bazel] Migrate to bzlmod for LLVM compatibility
LLVM has fully migrated to bzlmod (PR #164891) and now requires bzlmod features like protobuf dependencies and new rules_cc APIs. This change migrates IREE's Bazel build to use bzlmod.
Changes:
- Add MODULE.bazel with dependencies matching LLVM's versions
- Add build_tools/bazel/extensions.bzl module extension for creating LLVM and IREE submodule repositories
- Enable bzlmod in iree.bazelrc
- Update flatcc BUILD.overlay to use includes= instead of hardcoded -Iexternal/... paths
- Update bitcode library paths for bzlmod repository naming
- Update llvm-project submodule to include upstream bzlmod changes
🤖 Generated with Claude Code
No need to review yet. This is just a draft I am trying to see what CI does. Ill get feeddback when this is ready for review
@bjacob if you have sometime, and assuming that you have some info on Bazel, just wanted to see if you have some feedback on whether CLAUDE is just vomiting garbage here, or is this actually OK.
@MaheshRavishankar :
- Is the WORKSPACE file still needed?
- Was either https://bazel.build/external/migration_tool or https://github.com/bazelbuild/bazel-central-registry/tree/main/tools/code-agent used? Just trying to gauge what is bespoke vs standard in this migration.
No, I just tried something. I didn't know there was a migration tool. I can try that out when I get back if that works better