Merge "Revert^3 "rust: Only allow bindgen to produce rlib
s.""
This commit is contained in:
commit
801b058fe3
3 changed files with 3 additions and 14 deletions
|
@ -299,15 +299,7 @@ func NewRustBindgen(hod android.HostOrDeviceSupported) (*Module, *bindgenDecorat
|
|||
ClangProperties: cc.RustBindgenClangProperties{},
|
||||
}
|
||||
|
||||
module := NewSourceProviderModule(hod, bindgen, false, true)
|
||||
|
||||
android.AddLoadHook(module, func(ctx android.LoadHookContext) {
|
||||
type stub_props struct {
|
||||
Visibility []string
|
||||
}
|
||||
props := &stub_props{[]string{":__subpackages__"}}
|
||||
ctx.PrependProperties(props)
|
||||
})
|
||||
module := NewSourceProviderModule(hod, bindgen, false)
|
||||
|
||||
return module, bindgen
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ func NewRustProtobuf(hod android.HostOrDeviceSupported) (*Module, *protobufDecor
|
|||
Properties: ProtobufProperties{},
|
||||
}
|
||||
|
||||
module := NewSourceProviderModule(hod, protobuf, false, false)
|
||||
module := NewSourceProviderModule(hod, protobuf, false)
|
||||
|
||||
return module, protobuf
|
||||
}
|
||||
|
|
|
@ -65,12 +65,9 @@ func NewSourceProvider() *BaseSourceProvider {
|
|||
}
|
||||
}
|
||||
|
||||
func NewSourceProviderModule(hod android.HostOrDeviceSupported, sourceProvider SourceProvider, enableLints bool, rlibOnly bool) *Module {
|
||||
func NewSourceProviderModule(hod android.HostOrDeviceSupported, sourceProvider SourceProvider, enableLints bool) *Module {
|
||||
_, library := NewRustLibrary(hod)
|
||||
library.BuildOnlyRust()
|
||||
if rlibOnly {
|
||||
library.BuildOnlyRlib()
|
||||
}
|
||||
library.sourceProvider = sourceProvider
|
||||
|
||||
module := newModule(hod, android.MultilibBoth)
|
||||
|
|
Loading…
Reference in a new issue