Merge "Export NewPrebuiltObject"

This commit is contained in:
Colin Cross 2021-07-01 20:53:24 +00:00 committed by Gerrit Code Review
commit 34d52eed1e
3 changed files with 8 additions and 8 deletions

View file

@ -94,8 +94,8 @@ type ObjectLinkerProperties struct {
Crt *bool
}
func newObject() *Module {
module := newBaseModule(android.HostAndDeviceSupported, android.MultilibBoth)
func newObject(hod android.HostOrDeviceSupported) *Module {
module := newBaseModule(hod, android.MultilibBoth)
module.sanitize = &sanitize{}
module.stl = &stl{}
return module
@ -105,7 +105,7 @@ func newObject() *Module {
// necessary, but sometimes used to generate .s files from .c files to use as
// input to a cc_genrule module.
func ObjectFactory() android.Module {
module := newObject()
module := newObject(android.HostAndDeviceSupported)
module.linker = &objectLinker{
baseLinker: NewBaseLinker(module.sanitize),
}

View file

@ -388,8 +388,8 @@ func (p *prebuiltObjectLinker) object() bool {
return true
}
func newPrebuiltObject() *Module {
module := newObject()
func NewPrebuiltObject(hod android.HostOrDeviceSupported) *Module {
module := newObject(hod)
prebuilt := &prebuiltObjectLinker{
objectLinker: objectLinker{
baseLinker: NewBaseLinker(nil),
@ -403,7 +403,7 @@ func newPrebuiltObject() *Module {
}
func prebuiltObjectFactory() android.Module {
module := newPrebuiltObject()
module := NewPrebuiltObject(android.HostAndDeviceSupported)
return module.Init()
}

View file

@ -931,7 +931,7 @@ func (p *snapshotObjectLinker) nativeCoverage() bool {
// development/vendor_snapshot/update.py. As a part of vendor snapshot, vendor_snapshot_object
// overrides the vendor variant of the cc object with the same name, if BOARD_VNDK_VERSION is set.
func VendorSnapshotObjectFactory() android.Module {
module := newObject()
module := newObject(android.DeviceSupported)
prebuilt := &snapshotObjectLinker{
objectLinker: objectLinker{
@ -949,7 +949,7 @@ func VendorSnapshotObjectFactory() android.Module {
// development/vendor_snapshot/update.py. As a part of recovery snapshot, recovery_snapshot_object
// overrides the recovery variant of the cc object with the same name, if BOARD_VNDK_VERSION is set.
func RecoverySnapshotObjectFactory() android.Module {
module := newObject()
module := newObject(android.DeviceSupported)
prebuilt := &snapshotObjectLinker{
objectLinker: objectLinker{