Merge "Revert "rust: Only allow bindgen to produce rlib
s."" am: d13d15a9c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2170067 Change-Id: I8ad271de87803942a99f899d90f36f8cbbb1e774 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
b0bb92726e
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