Revert "Split Rust crate builds into compile and link phases."

This reverts commit e7c71c344d462cac998b37d551bd78baa892082d.
The intermediates created by the separated rust compile steps are very
large, on the order of 60GB.  This is more than CI can support for now,
revert the split into compile and link phases.  This comes at the expense
of incremental build time, especially when modifying C/C++ sources that
are dependencies of rust modules.

Bug: 293349612
Test: builds
Change-Id: I81169e7d0727330c8de5e7688dcdc87fe7b8d3b5
diff --git a/rust/compiler.go b/rust/compiler.go
index d6c52e8..6f61798 100644
--- a/rust/compiler.go
+++ b/rust/compiler.go
@@ -328,12 +328,15 @@
 	}
 
 	if !ctx.toolchain().Bionic() && ctx.Os() != android.LinuxMusl && !ctx.Windows() {
-		// Add -ldl, -lpthread, -lm and -lrt to host builds to match the default behavior of device
+		// Add -lc, -lrt, -ldl, -lpthread, -lm, -lrt and -lgcc_s to host builds to match the default behavior of device
 		// builds. This is irrelevant for the Windows target as these are Posix specific.
 		flags.LinkFlags = append(flags.LinkFlags,
+			"-lc",
+			"-lrt",
 			"-ldl",
 			"-lpthread",
 			"-lm",
+			"-lgcc_s",
 		)
 	}
 	return flags