Revert "bp2build conversion for Sanitize.Integer_overflow"

Revert submission 2277186-ubsan_bp2build

Reason for revert: b/260630869 broke mixed_droid
Reverted Changes:
Idd9b33e53:bp2build conversion for Sanitize.Integer_overflow
I0d636e439:Add Sanitizer libs up the dependency tree
If113de7bc:Introduce toolchain features for sanitizers

Change-Id: Idf7e7b62f6fb6d4ff92341cc4c9c4b7426b70951
This commit is contained in:
Jingwen Chen
2022-11-28 22:44:35 +00:00
committed by Gerrit Code Review
parent 548fc5dcec
commit 0ead79bd11
5 changed files with 2 additions and 372 deletions

View File

@@ -845,85 +845,3 @@ cc_library_shared {
},
})
}
func TestCcLibrarySharedWithIntegerOverflowProperty(t *testing.T) {
runCcLibrarySharedTestCase(t, Bp2buildTestCase{
Description: "cc_library_shared has correct features when integer_overflow property is provided",
Blueprint: `
cc_library_shared {
name: "foo",
sanitize: {
integer_overflow: true,
},
}
`,
ExpectedBazelTargets: []string{
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
"features": `["ubsan_integer_overflow"]`,
"local_includes": `["."]`,
}),
},
})
}
func TestCcLibrarySharedWithMiscUndefinedProperty(t *testing.T) {
runCcLibrarySharedTestCase(t, Bp2buildTestCase{
Description: "cc_library_shared has correct features when misc_undefined property is provided",
Blueprint: `
cc_library_shared {
name: "foo",
sanitize: {
misc_undefined: ["undefined", "nullability"],
},
}
`,
ExpectedBazelTargets: []string{
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
"features": `[
"ubsan_undefined",
"ubsan_nullability",
]`,
"local_includes": `["."]`,
}),
},
})
}
func TestCcLibrarySharedWithUBSanPropertiesArchSpecific(t *testing.T) {
runCcLibrarySharedTestCase(t, Bp2buildTestCase{
Description: "cc_library_shared has correct feature select when UBSan props are specified in arch specific blocks",
Blueprint: `
cc_library_shared {
name: "foo",
sanitize: {
misc_undefined: ["undefined", "nullability"],
},
target: {
android: {
sanitize: {
misc_undefined: ["alignment"],
},
},
linux_glibc: {
sanitize: {
integer_overflow: true,
},
},
},
}
`,
ExpectedBazelTargets: []string{
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
"features": `[
"ubsan_undefined",
"ubsan_nullability",
] + select({
"//build/bazel/platforms/os:android": ["ubsan_alignment"],
"//build/bazel/platforms/os:linux": ["ubsan_integer_overflow"],
"//conditions:default": [],
})`,
"local_includes": `["."]`,
}),
},
})
}