rust: Add version scripts and symbol exports

This allows Rust modules to define a version_script for shared library
variants.

This requires using a wrapper for the linker (clang++) to intercept
the flags which rustc emits.

This also adds the ability to export additional symbols in addition
to those exported by rustc by default, e.g. whole_static_library
symbols.

Bug: 314309643
Test: New Soong tests pass.
Test: m
Test: m <simple version script module>
Test: m <simple extra symbols module>

Change-Id: I93c9552e5e1181df4663d194c4df4b7053553dd4
diff --git a/rust/config/global.go b/rust/config/global.go
index 7b79fca..66ffc0b 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -121,7 +121,7 @@
 	pctx.StaticVariable("RustBin", "${RustPath}/bin")
 
 	pctx.ImportAs("cc_config", "android/soong/cc/config")
-	pctx.StaticVariable("RustLinker", "${cc_config.ClangBin}/clang++")
+	pctx.StaticVariable("ClangCmd", "${cc_config.ClangBin}/clang++")
 
 	pctx.StaticVariable("DeviceGlobalLinkFlags", strings.Join(deviceGlobalLinkFlags, " "))