rust: Add stub support for rust_ffi modules
This adds stubs support for rust_ffi and rust_ffi_shared modules. Usage
should match current cc usage. The stubs generator leveraged is the cc
stubs generator.
Bug: 203478530
Test: m blueprint_tests
Change-Id: I043b9714a357cd5fe17c183ccdf86900f5172e0e
diff --git a/cc/linker.go b/cc/linker.go
index 20c2f4a..f854937 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -471,7 +471,7 @@
// ModuleContext extends BaseModuleContext
// BaseModuleContext should know if LLD is used?
-func commonLinkerFlags(ctx android.ModuleContext, flags Flags, useClangLld bool,
+func CommonLinkerFlags(ctx android.ModuleContext, flags Flags, useClangLld bool,
toolchain config.Toolchain, allow_undefined_symbols bool) Flags {
hod := "Host"
if ctx.Os().Class == android.Device {
@@ -480,7 +480,7 @@
mod, ok := ctx.Module().(LinkableInterface)
if !ok {
- ctx.ModuleErrorf("trying to add commonLinkerFlags to non-LinkableInterface module.")
+ ctx.ModuleErrorf("trying to add CommonLinkerFlags to non-LinkableInterface module.")
return flags
}
if useClangLld {
@@ -531,7 +531,7 @@
toolchain := ctx.toolchain()
allow_undefined_symbols := Bool(linker.Properties.Allow_undefined_symbols)
- flags = commonLinkerFlags(ctx, flags, linker.useClangLld(ctx), toolchain,
+ flags = CommonLinkerFlags(ctx, flags, linker.useClangLld(ctx), toolchain,
allow_undefined_symbols)
if !toolchain.Bionic() && ctx.Os() != android.LinuxMusl {