summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go
index a4c1afd45..2332b52ec 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -1104,6 +1104,16 @@ func (mod *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
IsPrebuilt: mod.IsPrebuilt(),
}
+ // Define the linker info if compiler != nil because Rust currently
+ // does compilation and linking in one step. If this changes in the future,
+ // move this as appropriate.
+ ccInfo.LinkerInfo = &cc.LinkerInfo{
+ WholeStaticLibs: mod.compiler.baseCompilerProps().Whole_static_libs,
+ StaticLibs: mod.compiler.baseCompilerProps().Static_libs,
+ SharedLibs: mod.compiler.baseCompilerProps().Shared_libs,
+ UnstrippedOutputFile: mod.UnstrippedOutputFile(),
+ }
+
android.SetProvider(ctx, cc.CcInfoProvider, ccInfo)
mod.setOutputFiles(ctx)