Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03dc3f63 authored by dimitry's avatar dimitry
Browse files

Enable native bridge support by default for certain ndk modules

The ndk_library, ndk_prebuilt_object and ndk_prebuilt_static_stl
modules are natural targets to have native bridge support enabled,
since they build user facing object which have to be supported for
translated architectures.

Bug: http://b/77159578
Test: make
Change-Id: Ic556f4c1c41e5b3dc92f9c290b4482dee8faed33
parent ffff95bc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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()
}
+1 −0
Original line number Diff line number Diff line
@@ -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
}
+2 −0
Original line number Diff line number Diff line
@@ -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()
}