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/cc/builder.go b/cc/builder.go
index cd535c1..2948ca3 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -821,7 +821,7 @@
return nil
}
- output := android.PathForModuleOut(ctx, "generated_rust_staticlib", "lib"+ctx.ModuleName()+"_rust_staticlib.a")
+ output := android.PathForModuleOut(ctx, "generated_rust_staticlib", "librustlibs.a")
stemFile := output.ReplaceExtension(ctx, "rs")
crateNames := []string{}