diff options
author | 2025-02-12 10:16:56 -0800 | |
---|---|---|
committer | 2025-02-12 10:16:56 -0800 | |
commit | d604240a568f94ae6edbba7c1a38ebc28e1653f3 (patch) | |
tree | 0c36a15795d5d8686063989c572ee0d3a03e1726 /rust/library.go | |
parent | 080e810c9f3ee8056d1d1ac2990d9508928d4eeb (diff) | |
parent | 85f00cff18b0a1f23ed8acf3186a5b5316919be6 (diff) |
Merge "rust:Add Rust support for made-to-order staticlibs" into main
Diffstat (limited to 'rust/library.go')
-rw-r--r-- | rust/library.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rust/library.go b/rust/library.go index 24ae8b046..7f5861fe8 100644 --- a/rust/library.go +++ b/rust/library.go @@ -737,12 +737,15 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa if library.rlib() { library.flagExporter.exportStaticLibs(deps.staticLibObjects...) } - // Since we have FFI rlibs, we need to collect their includes as well if library.static() || library.shared() || library.rlib() || library.stubs() { - android.SetProvider(ctx, cc.FlagExporterInfoProvider, cc.FlagExporterInfo{ + ccExporter := cc.FlagExporterInfo{ IncludeDirs: android.FirstUniquePaths(library.includeDirs), - }) + } + if library.rlib() { + ccExporter.RustRlibDeps = append(ccExporter.RustRlibDeps, deps.reexportedCcRlibDeps...) + } + android.SetProvider(ctx, cc.FlagExporterInfoProvider, ccExporter) } if library.shared() || library.stubs() { |