Add "strip: {none: true}" for cc_prebuilt_library_shared in sdk snapshot.
Prebuilt cannot be stripped in older platform. Therefore, we set stripper to none to skip the call to strip.sh. Bug: 350050115 Test: SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE=Tiramisu m art-module-sdk Test: Create module sdk from this and drop into tm-dev Change-Id: I911ce24ca18435f95395c43fc5e73110a50b3067
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() []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
|
||||
// otherwise.
|
||||
ArePrebuiltsRequired() bool
|
||||
@@ -618,6 +621,9 @@ type SdkMemberTypeBase struct {
|
||||
// The names of linkage variants supported by this module.
|
||||
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
|
||||
// property to be specifiable in an Android.bp file.
|
||||
BpPropertyNotRequired bool
|
||||
@@ -689,6 +695,10 @@ func (b *SdkMemberTypeBase) SupportedLinkages() []string {
|
||||
return b.SupportedLinkageNames
|
||||
}
|
||||
|
||||
func (b *SdkMemberTypeBase) DisablesStrip() bool {
|
||||
return b.StripDisabled
|
||||
}
|
||||
|
||||
// registeredModuleExportsMemberTypes is the set of registered SdkMemberTypes for module_exports
|
||||
// modules.
|
||||
var registeredModuleExportsMemberTypes = &sdkRegistry{}
|
||||
|
@@ -31,6 +31,7 @@ var sharedLibrarySdkMemberType = &librarySdkMemberType{
|
||||
SupportsSdk: true,
|
||||
HostOsDependent: true,
|
||||
SupportedLinkageNames: []string{"shared"},
|
||||
StripDisabled: true,
|
||||
},
|
||||
prebuiltModuleType: "cc_prebuilt_library_shared",
|
||||
}
|
||||
|
@@ -148,6 +148,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["linux_glibc/x86_64/lib/sdkmember.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -368,6 +371,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/mynativelib.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -455,6 +461,9 @@ cc_prebuilt_library_shared {
|
||||
},
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -697,6 +706,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["x86_64/lib/mynativelib.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -824,6 +836,9 @@ cc_prebuilt_library_shared {
|
||||
export_include_dirs: ["arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -932,6 +947,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/mynativelib.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
@@ -950,6 +968,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/myothernativelib.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
@@ -967,6 +988,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/mysystemnativelib.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -1041,6 +1065,9 @@ cc_prebuilt_library_shared {
|
||||
export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -1127,6 +1154,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["windows/x86_64/lib/mynativelib.dll"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -2021,6 +2051,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/sslnil.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
@@ -2038,6 +2071,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/sslempty.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
@@ -2055,6 +2091,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/sslnonempty.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`))
|
||||
|
||||
@@ -2114,6 +2153,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["linux_glibc/x86/lib/sslvariants.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
)
|
||||
@@ -2171,6 +2213,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/stubslib.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`))
|
||||
}
|
||||
@@ -2242,6 +2287,9 @@ cc_prebuilt_library_shared {
|
||||
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"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
@@ -2355,6 +2406,9 @@ cc_prebuilt_library_shared {
|
||||
srcs: ["arm/lib/mynativelib.so"],
|
||||
},
|
||||
},
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
}
|
||||
`),
|
||||
checkAllCopyRules(`
|
||||
|
@@ -434,6 +434,14 @@ be unnecessary as every module in the sdk already has its own licenses property.
|
||||
prebuiltModule := memberType.AddPrebuiltModule(memberCtx, member)
|
||||
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) {
|
||||
// More exceptions
|
||||
// 1. Skip BCP and SCCP fragments
|
||||
|
Reference in New Issue
Block a user