Merge "rust: expand docstrings for Rust module types" am: a512bb53ad

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2309186

Change-Id: Ica2a9cbd1865af7d2ff50dc1e28273115c2fc757
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Martin Geisler 2022-11-21 11:05:13 +00:00 committed by Automerger Merge Worker
commit a2ce0d3590

View file

@ -267,84 +267,94 @@ var _ compiler = (*libraryDecorator)(nil)
var _ libraryInterface = (*libraryDecorator)(nil) var _ libraryInterface = (*libraryDecorator)(nil)
var _ exportedFlagsProducer = (*libraryDecorator)(nil) var _ exportedFlagsProducer = (*libraryDecorator)(nil)
// rust_library produces all rust variants. // rust_library produces all Rust variants (rust_library_dylib and
// rust_library_rlib).
func RustLibraryFactory() android.Module { func RustLibraryFactory() android.Module {
module, library := NewRustLibrary(android.HostAndDeviceSupported) module, library := NewRustLibrary(android.HostAndDeviceSupported)
library.BuildOnlyRust() library.BuildOnlyRust()
return module.Init() return module.Init()
} }
// rust_ffi produces all ffi variants. // rust_ffi produces all FFI variants (rust_ffi_shared and
// rust_ffi_static).
func RustFFIFactory() android.Module { func RustFFIFactory() android.Module {
module, library := NewRustLibrary(android.HostAndDeviceSupported) module, library := NewRustLibrary(android.HostAndDeviceSupported)
library.BuildOnlyFFI() library.BuildOnlyFFI()
return module.Init() return module.Init()
} }
// rust_library_dylib produces a dylib. // rust_library_dylib produces a Rust dylib (Rust crate type "dylib").
func RustLibraryDylibFactory() android.Module { func RustLibraryDylibFactory() android.Module {
module, library := NewRustLibrary(android.HostAndDeviceSupported) module, library := NewRustLibrary(android.HostAndDeviceSupported)
library.BuildOnlyDylib() library.BuildOnlyDylib()
return module.Init() return module.Init()
} }
// rust_library_rlib produces an rlib. // rust_library_rlib produces an rlib (Rust crate type "rlib").
func RustLibraryRlibFactory() android.Module { func RustLibraryRlibFactory() android.Module {
module, library := NewRustLibrary(android.HostAndDeviceSupported) module, library := NewRustLibrary(android.HostAndDeviceSupported)
library.BuildOnlyRlib() library.BuildOnlyRlib()
return module.Init() return module.Init()
} }
// rust_ffi_shared produces a shared library. // rust_ffi_shared produces a shared library (Rust crate type
// "cdylib").
func RustFFISharedFactory() android.Module { func RustFFISharedFactory() android.Module {
module, library := NewRustLibrary(android.HostAndDeviceSupported) module, library := NewRustLibrary(android.HostAndDeviceSupported)
library.BuildOnlyShared() library.BuildOnlyShared()
return module.Init() return module.Init()
} }
// rust_ffi_static produces a static library. // rust_ffi_static produces a static library (Rust crate type
// "staticlib").
func RustFFIStaticFactory() android.Module { func RustFFIStaticFactory() android.Module {
module, library := NewRustLibrary(android.HostAndDeviceSupported) module, library := NewRustLibrary(android.HostAndDeviceSupported)
library.BuildOnlyStatic() library.BuildOnlyStatic()
return module.Init() return module.Init()
} }
// rust_library_host produces all rust variants. // rust_library_host produces all Rust variants for the host
// (rust_library_dylib_host and rust_library_rlib_host).
func RustLibraryHostFactory() android.Module { func RustLibraryHostFactory() android.Module {
module, library := NewRustLibrary(android.HostSupported) module, library := NewRustLibrary(android.HostSupported)
library.BuildOnlyRust() library.BuildOnlyRust()
return module.Init() return module.Init()
} }
// rust_ffi_host produces all FFI variants. // rust_ffi_host produces all FFI variants for the host
// (rust_ffi_static_host and rust_ffi_shared_host).
func RustFFIHostFactory() android.Module { func RustFFIHostFactory() android.Module {
module, library := NewRustLibrary(android.HostSupported) module, library := NewRustLibrary(android.HostSupported)
library.BuildOnlyFFI() library.BuildOnlyFFI()
return module.Init() return module.Init()
} }
// rust_library_dylib_host produces a dylib. // rust_library_dylib_host produces a dylib for the host (Rust crate
// type "dylib").
func RustLibraryDylibHostFactory() android.Module { func RustLibraryDylibHostFactory() android.Module {
module, library := NewRustLibrary(android.HostSupported) module, library := NewRustLibrary(android.HostSupported)
library.BuildOnlyDylib() library.BuildOnlyDylib()
return module.Init() return module.Init()
} }
// rust_library_rlib_host produces an rlib. // rust_library_rlib_host produces an rlib for the host (Rust crate
// type "rlib").
func RustLibraryRlibHostFactory() android.Module { func RustLibraryRlibHostFactory() android.Module {
module, library := NewRustLibrary(android.HostSupported) module, library := NewRustLibrary(android.HostSupported)
library.BuildOnlyRlib() library.BuildOnlyRlib()
return module.Init() return module.Init()
} }
// rust_ffi_static_host produces a static library. // rust_ffi_static_host produces a static library for the host (Rust
// crate type "staticlib").
func RustFFIStaticHostFactory() android.Module { func RustFFIStaticHostFactory() android.Module {
module, library := NewRustLibrary(android.HostSupported) module, library := NewRustLibrary(android.HostSupported)
library.BuildOnlyStatic() library.BuildOnlyStatic()
return module.Init() return module.Init()
} }
// rust_ffi_shared_host produces an shared library. // rust_ffi_shared_host produces an shared library for the host (Rust
// crate type "cdylib").
func RustFFISharedHostFactory() android.Module { func RustFFISharedHostFactory() android.Module {
module, library := NewRustLibrary(android.HostSupported) module, library := NewRustLibrary(android.HostSupported)
library.BuildOnlyShared() library.BuildOnlyShared()