Clean up several CMake options configured for our CI builds. (#5197)

* Remove no longer used IREE_BUILD_DEBUGGER CMake option.
* Remove several explicit CMake options from rebuild.sh, turning on samples builds through CMake.

Co-authored-by: Geoffrey Martin-Noble <gcmn@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6cc8831..1938a50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,6 @@
 option(IREE_BUILD_TESTS "Builds IREE unit tests." ON)
 option(IREE_BUILD_DOCS "Builds IREE docs." OFF)
 option(IREE_BUILD_SAMPLES "Builds IREE sample projects." ON)
-option(IREE_BUILD_DEBUGGER "Builds the IREE debugger app." OFF)
 
 option(IREE_BUILD_TENSORFLOW_COMPILER "Builds TensorFlow compiler frontend." OFF)
 option(IREE_BUILD_TFLITE_COMPILER "Builds the TFLite compiler frontend." OFF)
diff --git a/build_tools/cmake/build_docs.sh b/build_tools/cmake/build_docs.sh
index d800329..4a3e8f9 100755
--- a/build_tools/cmake/build_docs.sh
+++ b/build_tools/cmake/build_docs.sh
@@ -42,7 +42,6 @@
                 -DIREE_BUILD_TESTS=ON \
                 -DIREE_BUILD_SAMPLES=OFF \
                 -DIREE_BUILD_DOCS=ON \
-                -DIREE_BUILD_DEBUGGER=OFF \
                 -DIREE_BUILD_PYTHON_BINDINGS=OFF \
                 -G Ninja
 # Generate docs and also build iree-opt for generating more docs :)
diff --git a/build_tools/cmake/iree_lit_test.cmake b/build_tools/cmake/iree_lit_test.cmake
index 5e84e41..2361c57 100644
--- a/build_tools/cmake/iree_lit_test.cmake
+++ b/build_tools/cmake/iree_lit_test.cmake
@@ -64,7 +64,7 @@
     string(REPLACE "::" "_" _DATA_DEP_NAME ${_DATA_DEP})
     # TODO(*): iree_sh_binary so we can avoid this.
     if("${_DATA_DEP_NAME}" STREQUAL "iree_tools_IreeFileCheck")
-      list(APPEND _DATA_DEP_PATHS "${CMAKE_SOURCE_DIR}/iree/tools/IreeFileCheck.sh")
+      list(APPEND _DATA_DEP_PATHS "${PROJECT_BINARY_DIR}/iree/tools/IreeFileCheck")
     else()
       list(APPEND _DATA_DEP_PATHS $<TARGET_FILE:${_DATA_DEP_NAME}>)
     endif()
diff --git a/build_tools/cmake/rebuild.sh b/build_tools/cmake/rebuild.sh
index 7705f5d..93fc026 100755
--- a/build_tools/cmake/rebuild.sh
+++ b/build_tools/cmake/rebuild.sh
@@ -35,11 +35,19 @@
   mkdir build
 fi
 cd build
-"$CMAKE_BIN" -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-                      -DIREE_BUILD_COMPILER=ON \
-                      -DIREE_BUILD_TESTS=ON \
-                      -DIREE_BUILD_SAMPLES=OFF \
-                      -DIREE_BUILD_DOCS=ON \
-                      -DIREE_BUILD_DEBUGGER=OFF \
-                      -DIREE_BUILD_PYTHON_BINDINGS=ON ..
+
+CMAKE_ARGS=(
+  "-G" "Ninja"
+  "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+
+  # Enable docs build on the CI. The additional builds are pretty fast and
+  # give us early warnings for some types of website publication errors.
+  "-DIREE_BUILD_DOCS=ON"
+
+  # Enable building the python bindings on CI. Most heavy targets are gated on
+  # IREE_ENABLE_TENSORFLOW, so what's left here should be fast.
+  "-DIREE_BUILD_PYTHON_BINDINGS=ON"
+)
+
+"$CMAKE_BIN" "${CMAKE_ARGS[@]?}" ..
 "$CMAKE_BIN" --build .
diff --git a/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-swiftshader/build.sh b/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-swiftshader/build.sh
index f9f898c..8a2076c 100755
--- a/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-swiftshader/build.sh
+++ b/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-swiftshader/build.sh
@@ -58,7 +58,6 @@
    -DIREE_BUILD_COMPILER=ON \
    -DIREE_BUILD_TESTS=ON \
    -DIREE_BUILD_SAMPLES=OFF \
-   -DIREE_BUILD_DEBUGGER=OFF \
    -DIREE_BUILD_XLA_COMPILER=ON \
    -DIREE_BUILD_TFLITE_COMPILER=ON \
    -DIREE_BUILD_TENSORFLOW_COMPILER=ON .
diff --git a/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-turing/build.sh b/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-turing/build.sh
index b3cb298..7eb92c3 100755
--- a/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-turing/build.sh
+++ b/build_tools/kokoro/gcp_ubuntu/cmake-bazel/linux/x86-turing/build.sh
@@ -61,7 +61,6 @@
    -DIREE_BUILD_COMPILER=ON \
    -DIREE_BUILD_TESTS=ON \
    -DIREE_BUILD_SAMPLES=OFF \
-   -DIREE_BUILD_DEBUGGER=OFF \
    -DIREE_BUILD_XLA_COMPILER=ON \
    -DIREE_BUILD_TFLITE_COMPILER=ON \
    -DIREE_BUILD_TENSORFLOW_COMPILER=ON .
diff --git a/docs/get_started/cmake_options_and_variables.md b/docs/get_started/cmake_options_and_variables.md
index 2de056b..c65c9ed 100644
--- a/docs/get_started/cmake_options_and_variables.md
+++ b/docs/get_started/cmake_options_and_variables.md
@@ -48,10 +48,6 @@
 
 Builds IREE sample projects. Defaults to `ON`.
 
-#### `IREE_BUILD_DEBUGGER`:BOOL
-
-Builds the IREE debugger app. Defaults to `OFF`.
-
 #### `IREE_BUILD_PYTHON_BINDINGS`:BOOL
 
 Builds the IREE python bindings. Defaults to `OFF`.