diff options
-rw-r--r-- | apex/apex_test.go | 2 | ||||
-rw-r--r-- | rust/bindgen.go | 2 | ||||
-rw-r--r-- | rust/compiler.go | 7 | ||||
-rw-r--r-- | rust/protobuf.go | 2 | ||||
-rw-r--r-- | rust/rust_test.go | 10 |
5 files changed, 5 insertions, 18 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index bd19cb5ef..8368db154 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -390,7 +390,7 @@ func TestBasicApex(t *testing.T) { name: "foo.rust", srcs: ["foo.rs"], rlibs: ["libfoo.rlib.rust"], - dylibs: ["libfoo.dylib.rust"], + rustlibs: ["libfoo.dylib.rust"], apex_available: ["myapex"], } diff --git a/rust/bindgen.go b/rust/bindgen.go index c2bf6af4c..407f2754f 100644 --- a/rust/bindgen.go +++ b/rust/bindgen.go @@ -294,7 +294,7 @@ func (b *bindgenDecorator) SourceProviderProps() []interface{} { // rust_bindgen generates Rust FFI bindings to C libraries using bindgen given a wrapper header as the primary input. // Bindgen has a number of flags to control the generated source, and additional flags can be passed to clang to ensure // the header and generated source is appropriately handled. It is recommended to add it as a dependency in the -// rlibs, dylibs or rustlibs property. It may also be added in the srcs property for external crates, using the ":" +// rlibs or rustlibs property. It may also be added in the srcs property for external crates, using the ":" // prefix. func RustBindgenFactory() android.Module { module, _ := NewRustBindgen(android.HostAndDeviceSupported) diff --git a/rust/compiler.go b/rust/compiler.go index 06ae12f79..84c1fce9b 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -91,10 +91,8 @@ type BaseCompilerProperties struct { // list of rust rlib crate dependencies Rlibs []string `android:"arch_variant"` - // list of rust dylib crate dependencies - Dylibs []string `android:"arch_variant"` - - // list of rust automatic crate dependencies + // list of rust automatic crate dependencies. + // Rustlibs linkage is rlib for host targets and dylib for device targets. Rustlibs []string `android:"arch_variant"` // list of rust proc_macro crate dependencies @@ -359,7 +357,6 @@ func (compiler *baseCompiler) strippedOutputFilePath() android.OptionalPath { func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps { deps.Rlibs = append(deps.Rlibs, compiler.Properties.Rlibs...) - deps.Dylibs = append(deps.Dylibs, compiler.Properties.Dylibs...) deps.Rustlibs = append(deps.Rustlibs, compiler.Properties.Rustlibs...) deps.ProcMacros = append(deps.ProcMacros, compiler.Properties.Proc_macros...) deps.StaticLibs = append(deps.StaticLibs, compiler.Properties.Static_libs...) diff --git a/rust/protobuf.go b/rust/protobuf.go index 0cf6e8c97..a14ebeaab 100644 --- a/rust/protobuf.go +++ b/rust/protobuf.go @@ -243,7 +243,7 @@ func (proto *protobufDecorator) SourceProviderDeps(ctx DepsContext, deps Deps) D // rust_protobuf generates protobuf rust code from the provided proto file. This uses the protoc-gen-rust plugin for // protoc. Additional flags to the protoc command can be passed via the proto_flags property. This module type will -// create library variants that can be used as a crate dependency by adding it to the rlibs, dylibs, and rustlibs +// create library variants that can be used as a crate dependency by adding it to the rlibs and rustlibs // properties of other modules. func RustProtobufFactory() android.Module { module, _ := NewRustProtobuf(android.HostAndDeviceSupported) diff --git a/rust/rust_test.go b/rust/rust_test.go index 3f4e29676..704bfe785 100644 --- a/rust/rust_test.go +++ b/rust/rust_test.go @@ -232,11 +232,6 @@ func TestDepsTracking(t *testing.T) { srcs: ["foo.rs"], crate_name: "shared", } - rust_library_host_dylib { - name: "libdylib", - srcs: ["foo.rs"], - crate_name: "dylib", - } rust_library_host_rlib { name: "librlib", srcs: ["foo.rs"], @@ -252,7 +247,6 @@ func TestDepsTracking(t *testing.T) { } rust_binary_host { name: "fizz-buzz", - dylibs: ["libdylib"], rlibs: ["librlib"], proc_macros: ["libpm"], static_libs: ["libstatic"], @@ -265,10 +259,6 @@ func TestDepsTracking(t *testing.T) { rustLink := ctx.ModuleForTests("fizz-buzz", "linux_glibc_x86_64").Rule("rustLink") // Since dependencies are added to AndroidMk* properties, we can check these to see if they've been picked up. - if !android.InList("libdylib", module.Properties.AndroidMkDylibs) { - t.Errorf("Dylib dependency not detected (dependency missing from AndroidMkDylibs)") - } - if !android.InList("librlib.rlib-std", module.Properties.AndroidMkRlibs) { t.Errorf("Rlib dependency not detected (dependency missing from AndroidMkRlibs)") } |