Add support for Rust C libraries.
Adds the ability for rust modules to be compiled as C libraries, and allows cc modules to depend on these rust-generated modules. This also means that soong-rust should not have any dependencies on soong-cc aside from what's required for testing. There's a couple small fixes included as well: - A bug in libNameFromFilePath that caused issues when library's had "lib" in their name. - VariantName is removed from rust library MutatedProperties since this was unused. Bug: 140726209 Test: Soong tests pass. Test: Example cc_binary can include a rust shared library as a dep. Test: m crosvm.experimental Change-Id: Ia7deed1345d2423001089014cc65ce7934123da4
This commit is contained in:
@@ -213,7 +213,7 @@ func checkVndkModule(t *testing.T, ctx *android.TestContext, name, subDir string
|
||||
t.Helper()
|
||||
|
||||
mod := ctx.ModuleForTests(name, vendorVariant).Module().(*Module)
|
||||
if !mod.hasVendorVariant() {
|
||||
if !mod.HasVendorVariant() {
|
||||
t.Errorf("%q must have vendor variant", name)
|
||||
}
|
||||
|
||||
@@ -230,8 +230,8 @@ func checkVndkModule(t *testing.T, ctx *android.TestContext, name, subDir string
|
||||
if mod.vndkdep == nil {
|
||||
t.Fatalf("%q must have `vndkdep`", name)
|
||||
}
|
||||
if !mod.isVndk() {
|
||||
t.Errorf("%q isVndk() must equal to true", name)
|
||||
if !mod.IsVndk() {
|
||||
t.Errorf("%q IsVndk() must equal to true", name)
|
||||
}
|
||||
if mod.isVndkSp() != isVndkSp {
|
||||
t.Errorf("%q isVndkSp() must equal to %t", name, isVndkSp)
|
||||
|
Reference in New Issue
Block a user