Move IREE_DRIVER_MODULES into an imported variable

This allows us to disable modules per platform (upstream only until we actually test on other platforms in OSS). In particular, the llvmjit requires LLVM, which we don't want to try to build on Android.

It also removes some duplication. General guidance to avoid dep variables because they add indirection to BUILD files and impede build analysis tools do not apply here because these are link-time registration dependencies which tooling can't determine are required with static analysis anyway.

PiperOrigin-RevId: 297705175
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake.py b/build_tools/bazel_to_cmake/bazel_to_cmake.py
index 932624d..ff0ef9b 100755
--- a/build_tools/bazel_to_cmake/bazel_to_cmake.py
+++ b/build_tools/bazel_to_cmake/bazel_to_cmake.py
@@ -101,6 +101,14 @@
     self.PLATFORM_VULKAN_TEST_DEPS = ["//iree/testing:gtest_main"]
     self.FLATBUFFER_SUPPORTS_REFLECTIONS = False
     self.PLATFORM_VULKAN_LOADER_COPTS = []
+    self.IREE_DRIVER_MODULES = [
+        "//iree/hal/interpreter:interpreter_driver_module",
+        # TODO(b/142004903): enable when Dawn HAL implementation is functional
+        # "//iree/hal/dawn:dawn_driver_module",
+        "//iree/hal/vmla:vmla_driver_module",
+        "//iree/hal/vulkan:vulkan_driver_module",
+        "//iree/hal/llvmjit:llvmjit_driver_module",
+    ]
 
   # ------------------------------------------------------------------------- #
   # Conversion utilities, written to reduce boilerplate and allow for reuse   #