Merge "Add "strip: {none: true}" for cc_prebuilt_library_shared in sdk snapshot." into main
This commit is contained in:
@@ -513,6 +513,9 @@ type SdkMemberType interface {
|
|||||||
// SupportedLinkages returns the names of the linkage variants supported by this module.
|
// SupportedLinkages returns the names of the linkage variants supported by this module.
|
||||||
SupportedLinkages() []string
|
SupportedLinkages() []string
|
||||||
|
|
||||||
|
// DisablesStrip returns true if the stripping needs to be disabled for this module.
|
||||||
|
DisablesStrip() bool
|
||||||
|
|
||||||
// ArePrebuiltsRequired returns true if prebuilts are required in the sdk snapshot, false
|
// ArePrebuiltsRequired returns true if prebuilts are required in the sdk snapshot, false
|
||||||
// otherwise.
|
// otherwise.
|
||||||
ArePrebuiltsRequired() bool
|
ArePrebuiltsRequired() bool
|
||||||
@@ -618,6 +621,9 @@ type SdkMemberTypeBase struct {
|
|||||||
// The names of linkage variants supported by this module.
|
// The names of linkage variants supported by this module.
|
||||||
SupportedLinkageNames []string
|
SupportedLinkageNames []string
|
||||||
|
|
||||||
|
// StripDisabled returns true if the stripping needs to be disabled for this module.
|
||||||
|
StripDisabled bool
|
||||||
|
|
||||||
// When set to true BpPropertyNotRequired indicates that the member type does not require the
|
// When set to true BpPropertyNotRequired indicates that the member type does not require the
|
||||||
// property to be specifiable in an Android.bp file.
|
// property to be specifiable in an Android.bp file.
|
||||||
BpPropertyNotRequired bool
|
BpPropertyNotRequired bool
|
||||||
@@ -689,6 +695,10 @@ func (b *SdkMemberTypeBase) SupportedLinkages() []string {
|
|||||||
return b.SupportedLinkageNames
|
return b.SupportedLinkageNames
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *SdkMemberTypeBase) DisablesStrip() bool {
|
||||||
|
return b.StripDisabled
|
||||||
|
}
|
||||||
|
|
||||||
// registeredModuleExportsMemberTypes is the set of registered SdkMemberTypes for module_exports
|
// registeredModuleExportsMemberTypes is the set of registered SdkMemberTypes for module_exports
|
||||||
// modules.
|
// modules.
|
||||||
var registeredModuleExportsMemberTypes = &sdkRegistry{}
|
var registeredModuleExportsMemberTypes = &sdkRegistry{}
|
||||||
|
@@ -31,6 +31,7 @@ var sharedLibrarySdkMemberType = &librarySdkMemberType{
|
|||||||
SupportsSdk: true,
|
SupportsSdk: true,
|
||||||
HostOsDependent: true,
|
HostOsDependent: true,
|
||||||
SupportedLinkageNames: []string{"shared"},
|
SupportedLinkageNames: []string{"shared"},
|
||||||
|
StripDisabled: true,
|
||||||
},
|
},
|
||||||
prebuiltModuleType: "cc_prebuilt_library_shared",
|
prebuiltModuleType: "cc_prebuilt_library_shared",
|
||||||
}
|
}
|
||||||
|
@@ -148,6 +148,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["linux_glibc/x86_64/lib/sdkmember.so"],
|
srcs: ["linux_glibc/x86_64/lib/sdkmember.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -368,6 +371,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/mynativelib.so"],
|
srcs: ["arm/lib/mynativelib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -455,6 +461,9 @@ cc_prebuilt_library_shared {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -697,6 +706,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["x86_64/lib/mynativelib.so"],
|
srcs: ["x86_64/lib/mynativelib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -824,6 +836,9 @@ cc_prebuilt_library_shared {
|
|||||||
export_include_dirs: ["arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl"],
|
export_include_dirs: ["arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -932,6 +947,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/mynativelib.so"],
|
srcs: ["arm/lib/mynativelib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_prebuilt_library_shared {
|
cc_prebuilt_library_shared {
|
||||||
@@ -950,6 +968,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/myothernativelib.so"],
|
srcs: ["arm/lib/myothernativelib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_prebuilt_library_shared {
|
cc_prebuilt_library_shared {
|
||||||
@@ -967,6 +988,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/mysystemnativelib.so"],
|
srcs: ["arm/lib/mysystemnativelib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -1041,6 +1065,9 @@ cc_prebuilt_library_shared {
|
|||||||
export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl"],
|
export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -1127,6 +1154,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["windows/x86_64/lib/mynativelib.dll"],
|
srcs: ["windows/x86_64/lib/mynativelib.dll"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -2021,6 +2051,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/sslnil.so"],
|
srcs: ["arm/lib/sslnil.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_prebuilt_library_shared {
|
cc_prebuilt_library_shared {
|
||||||
@@ -2038,6 +2071,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/sslempty.so"],
|
srcs: ["arm/lib/sslempty.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_prebuilt_library_shared {
|
cc_prebuilt_library_shared {
|
||||||
@@ -2055,6 +2091,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/sslnonempty.so"],
|
srcs: ["arm/lib/sslnonempty.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`))
|
`))
|
||||||
|
|
||||||
@@ -2114,6 +2153,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["linux_glibc/x86/lib/sslvariants.so"],
|
srcs: ["linux_glibc/x86/lib/sslvariants.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
@@ -2171,6 +2213,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/stubslib.so"],
|
srcs: ["arm/lib/stubslib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`))
|
`))
|
||||||
}
|
}
|
||||||
@@ -2242,6 +2287,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["linux_glibc/x86/lib/stubslib.so"],
|
srcs: ["linux_glibc/x86/lib/stubslib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
@@ -2298,6 +2346,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["linux_glibc/x86/lib/mylib-host.so"],
|
srcs: ["linux_glibc/x86/lib/mylib-host.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
@@ -2355,6 +2406,9 @@ cc_prebuilt_library_shared {
|
|||||||
srcs: ["arm/lib/mynativelib.so"],
|
srcs: ["arm/lib/mynativelib.so"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
strip: {
|
||||||
|
none: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
|
@@ -434,6 +434,14 @@ be unnecessary as every module in the sdk already has its own licenses property.
|
|||||||
prebuiltModule := memberType.AddPrebuiltModule(memberCtx, member)
|
prebuiltModule := memberType.AddPrebuiltModule(memberCtx, member)
|
||||||
s.createMemberSnapshot(memberCtx, member, prebuiltModule.(*bpModule))
|
s.createMemberSnapshot(memberCtx, member, prebuiltModule.(*bpModule))
|
||||||
|
|
||||||
|
// Set stripper to none to skip stripping for generated snapshots.
|
||||||
|
// Mainline prebuilts (cc_prebuilt_library_shared) are not strippable in older platforms.
|
||||||
|
// Thus, stripping should be skipped when being used as prebuilts.
|
||||||
|
if memberType.DisablesStrip() {
|
||||||
|
stripPropertySet := prebuiltModule.(*bpModule).AddPropertySet("strip")
|
||||||
|
stripPropertySet.AddProperty("none", true)
|
||||||
|
}
|
||||||
|
|
||||||
if member.memberType != android.LicenseModuleSdkMemberType && !builder.isInternalMember(member.name) {
|
if member.memberType != android.LicenseModuleSdkMemberType && !builder.isInternalMember(member.name) {
|
||||||
// More exceptions
|
// More exceptions
|
||||||
// 1. Skip BCP and SCCP fragments
|
// 1. Skip BCP and SCCP fragments
|
||||||
|
Reference in New Issue
Block a user