diff options
author | 2024-10-30 19:30:48 +0000 | |
---|---|---|
committer | 2024-10-30 19:30:48 +0000 | |
commit | 872e8463db9846335cc7c7a8d5ffdb463af9d73e (patch) | |
tree | 2c4cfa52516e63222990e2df1016b9fe53fcd99d /rust/builder.go | |
parent | e5b61ba36e5f8f5ea4f70472defe3e6d8a445a26 (diff) |
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
Diffstat (limited to 'rust/builder.go')
-rw-r--r-- | rust/builder.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/builder.go b/rust/builder.go index f469f56f8..a1e17fc3f 100644 --- a/rust/builder.go +++ b/rust/builder.go @@ -170,6 +170,9 @@ func TransformSrctoRlib(ctx ModuleContext, mainSrc android.Path, deps PathDeps, 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 { |