Flip checks from CMAKE_CROSSCOMPILING to IREE_HOST_BINARY_ROOT. (#11439)

We don't really care about cross compilation per se... just that the
tools should be provided somehow.

Progress on https://github.com/iree-org/iree/issues/4662
diff --git a/build_tools/cmake/iree_check_test.cmake b/build_tools/cmake/iree_check_test.cmake
index e747127..1aa0854 100644
--- a/build_tools/cmake/iree_check_test.cmake
+++ b/build_tools/cmake/iree_check_test.cmake
@@ -82,21 +82,10 @@
 
   # Check tests require (by way of iree_bytecode_module) some tools.
   #
-  # On the host, we can either build the tools directly, if IREE_BUILD_COMPILER
-  # is enabled, or reuse the tools from an existing build (or binary release).
-  #
-  # In some configurations (e.g. when cross compiling for Android), we can't
-  # always build the tools and may depend on them from a host build.
-  #
-  # For now we enable check tests:
-  #   On the host if IREE_BUILD_COMPILER is set
-  #   Always when cross compiling (assuming host tools exist)
-  #
-  # In the future, we should probably add some orthogonal options that give
-  # more control (such as using tools from a binary release in a runtime-only
-  # host build, or skipping check tests in an Android build).
-  # TODO(#4662): add flexible configurable options that cover more uses
-  if(NOT IREE_BUILD_COMPILER AND NOT CMAKE_CROSSCOMPILING)
+  # These can either be built from source, if IREE_BUILD_COMPILER is set, or
+  # be located under IREE_HOST_BINARY_ROOT. The latter is required if
+  # cross-compiling.
+  if(NOT IREE_BUILD_COMPILER AND NOT IREE_HOST_BINARY_ROOT)
     return()
   endif()
 
diff --git a/build_tools/cmake/iree_static_linker_test.cmake b/build_tools/cmake/iree_static_linker_test.cmake
index 1de9f8f..517b8f4 100644
--- a/build_tools/cmake/iree_static_linker_test.cmake
+++ b/build_tools/cmake/iree_static_linker_test.cmake
@@ -48,7 +48,7 @@
   endif()
 
   # See comment in iree_check_test about this condition.
-  if(NOT IREE_BUILD_COMPILER AND NOT CMAKE_CROSSCOMPILING)
+  if(NOT IREE_BUILD_COMPILER AND NOT IREE_HOST_BINARY_ROOT)
     return()
   endif()
 
diff --git a/build_tools/cmake/iree_trace_runner_test.cmake b/build_tools/cmake/iree_trace_runner_test.cmake
index 2fc34c2..cf6f5dd 100644
--- a/build_tools/cmake/iree_trace_runner_test.cmake
+++ b/build_tools/cmake/iree_trace_runner_test.cmake
@@ -35,7 +35,7 @@
   endif()
 
   # See comment in iree_check_test about this condition.
-  if(NOT IREE_BUILD_COMPILER AND NOT CMAKE_CROSSCOMPILING)
+  if(NOT IREE_BUILD_COMPILER AND NOT IREE_HOST_BINARY_ROOT)
     return()
   endif()
 
@@ -130,7 +130,7 @@
   endif()
 
   # Copied from iree_check_test. Refer to the comment there.
-  if(NOT IREE_BUILD_COMPILER AND NOT CMAKE_CROSSCOMPILING)
+  if(NOT IREE_BUILD_COMPILER AND NOT IREE_HOST_BINARY_ROOT)
     return()
   endif()