Bp2build Sanitizer Blocklist

Bug: 286894426
Test: Unit tests
Change-Id: I382e028410a185a5017dba1fc47c83ad5b2432cf
This commit is contained in:
Trevor Radcliffe
2023-06-12 19:18:28 +00:00
parent 5244c1a19f
commit ded095ce45
8 changed files with 109 additions and 3 deletions

View File

@@ -868,6 +868,25 @@ func TestCcBinaryWithUBSanPropertiesArchSpecific(t *testing.T) {
})
}
func TestCcBinaryWithSanitizerBlocklist(t *testing.T) {
runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
description: "cc_binary has the correct feature when sanitize.blocklist is provided",
blueprint: `
{rule_name} {
name: "foo",
sanitize: {
blocklist: "foo_blocklist.txt",
},
}`,
targets: []testBazelTarget{
{"cc_binary", "foo", AttrNameToString{
"local_includes": `["."]`,
"features": `["ubsan_blocklist_foo_blocklist_txt"]`,
}},
},
})
}
func TestCcBinaryWithThinLto(t *testing.T) {
runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
description: "cc_binary has correct features when thin LTO is enabled",