Loading cc/library_sdk_member.go +12 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,11 @@ var includeDirProperties = []includeDirsProperty{ // Add properties that may, or may not, be arch specific. func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, builder android.SnapshotBuilder, libInfo *nativeLibInfoProperties, outputProperties android.BpPropertySet) { if libInfo.SanitizeNever { sanitizeSet := outputProperties.AddPropertySet("sanitize") sanitizeSet.AddProperty("never", true) } // Copy the generated library to the snapshot and add a reference to it in the .bp module. if libInfo.outputFile != nil { nativeLibraryPath := nativeLibraryPathFor(libInfo) Loading Loading @@ -359,6 +364,9 @@ type nativeLibInfoProperties struct { // not vary by arch so cannot be android specific. StubsVersion string `sdk:"ignored-on-host"` // Value of SanitizeProperties.Sanitize.Never. Needs to be propagated for CRT objects. SanitizeNever bool `android:"arch_variant"` // outputFile is not exported as it is always arch specific. outputFile android.Path } Loading Loading @@ -405,6 +413,10 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte if ccModule.HasStubsVariants() { p.StubsVersion = ccModule.StubsVersion() } if ccModule.sanitize != nil && proptools.Bool(ccModule.sanitize.Properties.Sanitize.Never) { p.SanitizeNever = true } } func getRequiredMemberOutputFile(ctx android.SdkMemberContext, ccModule *Module) android.Path { Loading sdk/cc_sdk_test.go +9 −0 Original line number Diff line number Diff line Loading @@ -340,6 +340,9 @@ func TestSnapshotWithObject(t *testing.T) { cc_object { name: "crtobj", stl: "none", sanitize: { never: true, }, } `) Loading @@ -352,6 +355,9 @@ cc_prebuilt_object { sdk_member_name: "crtobj", stl: "none", compile_multilib: "both", sanitize: { never: true, }, arch: { arm64: { srcs: ["arm64/lib/crtobj.o"], Loading @@ -367,6 +373,9 @@ cc_prebuilt_object { prefer: false, stl: "none", compile_multilib: "both", sanitize: { never: true, }, arch: { arm64: { srcs: ["arm64/lib/crtobj.o"], Loading Loading
cc/library_sdk_member.go +12 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,11 @@ var includeDirProperties = []includeDirsProperty{ // Add properties that may, or may not, be arch specific. func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, builder android.SnapshotBuilder, libInfo *nativeLibInfoProperties, outputProperties android.BpPropertySet) { if libInfo.SanitizeNever { sanitizeSet := outputProperties.AddPropertySet("sanitize") sanitizeSet.AddProperty("never", true) } // Copy the generated library to the snapshot and add a reference to it in the .bp module. if libInfo.outputFile != nil { nativeLibraryPath := nativeLibraryPathFor(libInfo) Loading Loading @@ -359,6 +364,9 @@ type nativeLibInfoProperties struct { // not vary by arch so cannot be android specific. StubsVersion string `sdk:"ignored-on-host"` // Value of SanitizeProperties.Sanitize.Never. Needs to be propagated for CRT objects. SanitizeNever bool `android:"arch_variant"` // outputFile is not exported as it is always arch specific. outputFile android.Path } Loading Loading @@ -405,6 +413,10 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte if ccModule.HasStubsVariants() { p.StubsVersion = ccModule.StubsVersion() } if ccModule.sanitize != nil && proptools.Bool(ccModule.sanitize.Properties.Sanitize.Never) { p.SanitizeNever = true } } func getRequiredMemberOutputFile(ctx android.SdkMemberContext, ccModule *Module) android.Path { Loading
sdk/cc_sdk_test.go +9 −0 Original line number Diff line number Diff line Loading @@ -340,6 +340,9 @@ func TestSnapshotWithObject(t *testing.T) { cc_object { name: "crtobj", stl: "none", sanitize: { never: true, }, } `) Loading @@ -352,6 +355,9 @@ cc_prebuilt_object { sdk_member_name: "crtobj", stl: "none", compile_multilib: "both", sanitize: { never: true, }, arch: { arm64: { srcs: ["arm64/lib/crtobj.o"], Loading @@ -367,6 +373,9 @@ cc_prebuilt_object { prefer: false, stl: "none", compile_multilib: "both", sanitize: { never: true, }, arch: { arm64: { srcs: ["arm64/lib/crtobj.o"], Loading