Build gnrt with Cargo instead of with GN

Since gnrt makes GN rules, this presents a chicken-and-egg problem when
ever the tool does the wrong thing, or when a Rust roll occurs. If the
GN rules (globally) are not correct, gnrt can not be compiled.

The tool is standalone and separate from Chromium, and will need to be
used as part of the Rust rolling procedure which is entirely outside
of the Chromium build intentionally. So this allows the tool to be
built and run as part of the Rust roll process.

As the gnrt_unittests target no longer exists, remove it from the bot
configs.

[email protected]

Bug: 1401042
Change-Id: Ib5a0c7659e6c7b4c9a8e3d4e32ae54e2bb6ae667
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4569088
Reviewed-by: Bruce Dawson <[email protected]>
Auto-Submit: danakj <[email protected]>
Reviewed-by: Ben Pastene <[email protected]>
Commit-Queue: Ben Pastene <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1151262}
diff --git a/BUILD.gn b/BUILD.gn
index 16f1a462..58f7039 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -849,6 +849,9 @@
   deps = [ ":rust_build_tests" ]
 
   if (toolchain_has_rust) {
+    # There is rust stuff behind flags in here.
+    deps += [ "//base:base_unittests" ]
+
     if (enable_rust_mojo) {
       deps += [
         "//mojo/public/rust",
@@ -856,15 +859,6 @@
         "//mojo/public/rust:mojo_rust_unittests",
       ]
     }
-
-    # gnrt is a developer tool run on developer machines. It is not needed when
-    # cross-compiling.
-    if (enable_rust_gnrt && host_os == target_os && host_cpu == target_cpu) {
-      deps += [
-        "//tools/crates/gnrt($host_toolchain)",
-        "//tools/crates/gnrt/lib:gnrt_unittests",
-      ]
-    }
   }
   if (enable_rust_gtest_interop) {
     deps += [ "//testing/rust_gtest_interop:rust_gtest_interop_unittests" ]