Merge "Enable native bridge support by default for certain ndk modules" am: 9c9fd4e73a

am: 64ad4e8d72

Change-Id: I610996c9aa9a3b6bca8572e939bd4f92958da1d8
This commit is contained in:
Dimitry Ivanov 2019-05-10 03:39:39 -07:00 committed by android-build-merger
commit f8eb90728a
3 changed files with 7 additions and 0 deletions

View File

@ -1299,6 +1299,10 @@ func (a *ModuleBase) MakeAsPlatform() {
a.commonProperties.Product_services_specific = boolPtr(false)
}
func (a *ModuleBase) EnableNativeBridgeSupportByDefault() {
a.commonProperties.Native_bridge_supported = boolPtr(true)
}
func (a *androidModuleContext) InstallInData() bool {
return a.module.InstallInData()
}

View File

@ -382,5 +382,6 @@ func newStubLibrary() *Module {
func ndkLibraryFactory() android.Module {
module := newStubLibrary()
android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth)
module.ModuleBase.EnableNativeBridgeSupportByDefault()
return module
}

View File

@ -70,6 +70,7 @@ func (*ndkPrebuiltObjectLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
// ./prebuilts/ndk/current/platforms/android-<sdk_version>/arch-$(HOST_ARCH)/usr/lib/<NAME>.o.
func ndkPrebuiltObjectFactory() android.Module {
module := newBaseModule(android.DeviceSupported, android.MultilibBoth)
module.ModuleBase.EnableNativeBridgeSupportByDefault()
module.linker = &ndkPrebuiltObjectLinker{
objectLinker: objectLinker{
baseLinker: NewBaseLinker(nil),
@ -134,6 +135,7 @@ func ndkPrebuiltStaticStlFactory() android.Module {
}
module.installer = nil
module.Properties.HideFromMake = true
module.ModuleBase.EnableNativeBridgeSupportByDefault()
return module.Init()
}