Loading android/module.go +0 −4 Original line number Diff line number Diff line Loading @@ -2434,10 +2434,6 @@ func (m *ModuleBase) MakeAsPlatform() { m.commonProperties.System_ext_specific = boolPtr(false) } func (m *ModuleBase) EnableNativeBridgeSupportByDefault() { m.commonProperties.Native_bridge_supported = boolPtr(true) } func (m *ModuleBase) MakeAsSystemExt() { m.commonProperties.Vendor = boolPtr(false) m.commonProperties.Proprietary = boolPtr(false) Loading cc/cc.go +2 −1 Original line number Diff line number Diff line Loading @@ -1058,7 +1058,8 @@ func (c *Module) UseVndk() bool { } func (c *Module) canUseSdk() bool { return c.Os() == android.Android && !c.UseVndk() && !c.InRamdisk() && !c.InRecovery() && !c.InVendorRamdisk() return c.Os() == android.Android && c.Target().NativeBridge == android.NativeBridgeDisabled && !c.UseVndk() && !c.InRamdisk() && !c.InRecovery() && !c.InVendorRamdisk() } func (c *Module) UseSdk() bool { Loading cc/ndk_library.go +0 −1 Original line number Diff line number Diff line Loading @@ -354,6 +354,5 @@ func newStubLibrary() *Module { func NdkLibraryFactory() android.Module { module := newStubLibrary() android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth) module.ModuleBase.EnableNativeBridgeSupportByDefault() return module } cc/ndk_prebuilt.go +0 −2 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ 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), Loading Loading @@ -150,7 +149,6 @@ func NdkPrebuiltStaticStlFactory() android.Module { module.Properties.AlwaysSdk = true module.Properties.Sdk_version = StringPtr("current") module.stl.Properties.Stl = StringPtr("none") module.ModuleBase.EnableNativeBridgeSupportByDefault() return module.Init() } Loading cc/sdk.go +13 −0 Original line number Diff line number Diff line Loading @@ -38,18 +38,31 @@ func sdkMutator(ctx android.BottomUpMutatorContext) { ctx.CreateVariations("sdk") } else if m.UseSdk() || m.SplitPerApiLevel() { modules := ctx.CreateVariations("", "sdk") // Clear the sdk_version property for the platform (non-SDK) variant so later code // doesn't get confused by it. modules[0].(*Module).Properties.Sdk_version = nil // Mark the SDK variant. modules[1].(*Module).Properties.IsSdkVariant = true if ctx.Config().UnbundledBuildApps() { // For an unbundled apps build, hide the platform variant from Make. modules[0].(*Module).Properties.HideFromMake = true modules[0].(*Module).Properties.PreventInstall = true } else { // For a platform build, mark the SDK variant so that it gets a ".sdk" suffix when // exposed to Make. modules[1].(*Module).Properties.SdkAndPlatformVariantVisibleToMake = true modules[1].(*Module).Properties.PreventInstall = true } ctx.AliasVariation("") } else { if m, ok := ctx.Module().(*Module); ok { // Clear the sdk_version property for modules that don't have an SDK variant so // later code doesn't get confused by it. m.Properties.Sdk_version = nil } ctx.CreateVariations("") ctx.AliasVariation("") } Loading Loading
android/module.go +0 −4 Original line number Diff line number Diff line Loading @@ -2434,10 +2434,6 @@ func (m *ModuleBase) MakeAsPlatform() { m.commonProperties.System_ext_specific = boolPtr(false) } func (m *ModuleBase) EnableNativeBridgeSupportByDefault() { m.commonProperties.Native_bridge_supported = boolPtr(true) } func (m *ModuleBase) MakeAsSystemExt() { m.commonProperties.Vendor = boolPtr(false) m.commonProperties.Proprietary = boolPtr(false) Loading
cc/cc.go +2 −1 Original line number Diff line number Diff line Loading @@ -1058,7 +1058,8 @@ func (c *Module) UseVndk() bool { } func (c *Module) canUseSdk() bool { return c.Os() == android.Android && !c.UseVndk() && !c.InRamdisk() && !c.InRecovery() && !c.InVendorRamdisk() return c.Os() == android.Android && c.Target().NativeBridge == android.NativeBridgeDisabled && !c.UseVndk() && !c.InRamdisk() && !c.InRecovery() && !c.InVendorRamdisk() } func (c *Module) UseSdk() bool { Loading
cc/ndk_library.go +0 −1 Original line number Diff line number Diff line Loading @@ -354,6 +354,5 @@ func newStubLibrary() *Module { func NdkLibraryFactory() android.Module { module := newStubLibrary() android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth) module.ModuleBase.EnableNativeBridgeSupportByDefault() return module }
cc/ndk_prebuilt.go +0 −2 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ 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), Loading Loading @@ -150,7 +149,6 @@ func NdkPrebuiltStaticStlFactory() android.Module { module.Properties.AlwaysSdk = true module.Properties.Sdk_version = StringPtr("current") module.stl.Properties.Stl = StringPtr("none") module.ModuleBase.EnableNativeBridgeSupportByDefault() return module.Init() } Loading
cc/sdk.go +13 −0 Original line number Diff line number Diff line Loading @@ -38,18 +38,31 @@ func sdkMutator(ctx android.BottomUpMutatorContext) { ctx.CreateVariations("sdk") } else if m.UseSdk() || m.SplitPerApiLevel() { modules := ctx.CreateVariations("", "sdk") // Clear the sdk_version property for the platform (non-SDK) variant so later code // doesn't get confused by it. modules[0].(*Module).Properties.Sdk_version = nil // Mark the SDK variant. modules[1].(*Module).Properties.IsSdkVariant = true if ctx.Config().UnbundledBuildApps() { // For an unbundled apps build, hide the platform variant from Make. modules[0].(*Module).Properties.HideFromMake = true modules[0].(*Module).Properties.PreventInstall = true } else { // For a platform build, mark the SDK variant so that it gets a ".sdk" suffix when // exposed to Make. modules[1].(*Module).Properties.SdkAndPlatformVariantVisibleToMake = true modules[1].(*Module).Properties.PreventInstall = true } ctx.AliasVariation("") } else { if m, ok := ctx.Module().(*Module); ok { // Clear the sdk_version property for modules that don't have an SDK variant so // later code doesn't get confused by it. m.Properties.Sdk_version = nil } ctx.CreateVariations("") ctx.AliasVariation("") } Loading