diff options
author | 2020-08-04 17:46:22 +0000 | |
---|---|---|
committer | 2020-08-04 17:46:22 +0000 | |
commit | 89e4882d3764dc5c749a630b22381d9ead761500 (patch) | |
tree | 8d36850db208a3215e70376b338fbce8c959a960 /rust/bindgen.go | |
parent | 9b7b8f169a069bd9011fb7a88174044d6c845760 (diff) | |
parent | 26ecd6c5974fcd3ec09792394e7b9cdf32f5f64f (diff) |
Merge "[rust] Add SourceProviders as crates support."
Diffstat (limited to 'rust/bindgen.go')
-rw-r--r-- | rust/bindgen.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rust/bindgen.go b/rust/bindgen.go index e8bbb35f1..304f8ec38 100644 --- a/rust/bindgen.go +++ b/rust/bindgen.go @@ -61,7 +61,7 @@ type BindgenProperties struct { Wrapper_src *string `android:"path,arch_variant"` // list of bindgen-specific flags and options - Flags []string `android:"arch_variant"` + Bindgen_flags []string `android:"arch_variant"` // list of clang flags required to correctly interpret the headers. Cflags []string `android:"arch_variant"` @@ -121,7 +121,7 @@ func (b *bindgenDecorator) generateSource(ctx android.ModuleContext, deps PathDe } bindgenFlags := defaultBindgenFlags - bindgenFlags = append(bindgenFlags, strings.Join(b.Properties.Flags, " ")) + bindgenFlags = append(bindgenFlags, strings.Join(b.Properties.Bindgen_flags, " ")) wrapperFile := android.OptionalPathForModuleSrc(ctx, b.Properties.Wrapper_src) if !wrapperFile.Valid() { @@ -170,7 +170,13 @@ func NewRustBindgen(hod android.HostOrDeviceSupported) (*Module, *bindgenDecorat baseSourceProvider: NewSourceProvider(), Properties: BindgenProperties{}, } + + _, library := NewRustLibrary(hod) + library.BuildOnlyRust() + library.sourceProvider = bindgen + module.sourceProvider = bindgen + module.compiler = library return module, bindgen } |