rust: Shorten name of generated Rust staticlibs

Some modules may have very long module names. Combined with the
intermediates produced by rustc, this may result in filepaths that are
too long. We can mitigate this somewhat by changing the generated crate
name for the staticlib to not be based on the parent module name.

Bug: 376452102
Test: m blueprint_tests
Test: m
Change-Id: I2d6210d32f7f65ddfa4d1cf1be433c1610b24949
diff --git a/rust/builder.go b/rust/builder.go
index f469f56..a1e17fc 100644
--- a/rust/builder.go
+++ b/rust/builder.go
@@ -170,6 +170,9 @@
 	return transformSrctoCrate(ctx, mainSrc, deps, flags, outputFile, getTransformProperties(ctx, "rlib"))
 }
 
+// TransformRlibstoStaticlib is assumed to be called from the cc module, and
+// thus needs to reconstruct the common set of flags which need to be passed
+// to the rustc compiler.
 func TransformRlibstoStaticlib(ctx android.ModuleContext, mainSrc android.Path, deps []cc.RustRlibDep,
 	outputFile android.WritablePath) android.Path {