Always add local_task and VMVX if building the compiler. (#9450)

Fixes https://github.com/google/iree/issues/8196

The [`ConstEval`](https://github.com/google/iree/tree/main/compiler/src/iree/compiler/ConstEval) compiler component unconditionally depends on VMVX and the `local-task` HAL driver. The compiler needs _some_ reference implementation available, but we still want to be able to prune the set of built and automatically registered drivers in the runtime.

This is one solution we liked - if the compiler is enabled, force its requirements enabled too.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3066ba..edeab9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -135,6 +135,12 @@
 option(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY "Enables the system dynamic library loader for local HAL drivers" ${IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT})
 option(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE "Enables the VMVX module loader for local HAL drivers" ${IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE_DEFAULT})
 
+if(IREE_BUILD_COMPILER)
+  # The compiler requires the local task driver with the VMVX loader.
+  set(IREE_HAL_DRIVER_LOCAL_TASK ON)
+  set(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE ON)
+endif()
+
 message(STATUS "IREE HAL drivers:")
 if(IREE_HAL_DRIVER_CUDA)
   message(STATUS "  - cuda")