Update name of blocklist feature in bp2build

Bug: 290908194
Test: Forrest
Change-Id: I0576fb644edb6b6043df9cf01b508ee887f946f1
This commit is contained in:
Trevor Radcliffe 2023-07-10 18:50:47 +00:00
parent a56663f695
commit d71487173e
5 changed files with 6 additions and 6 deletions

View file

@ -881,7 +881,7 @@ func TestCcBinaryWithSanitizerBlocklist(t *testing.T) {
targets: []testBazelTarget{
{"cc_binary", "foo", AttrNameToString{
"local_includes": `["."]`,
"features": `["ubsan_blocklist_foo_blocklist_txt"]`,
"features": `["sanitizer_blocklist_foo_blocklist_txt"]`,
}},
},
})

View file

@ -4194,11 +4194,11 @@ cc_library {
`,
ExpectedBazelTargets: []string{
MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
"features": `["ubsan_blocklist_foo_blocklist_txt"]`,
"features": `["sanitizer_blocklist_foo_blocklist_txt"]`,
"local_includes": `["."]`,
}),
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
"features": `["ubsan_blocklist_foo_blocklist_txt"]`,
"features": `["sanitizer_blocklist_foo_blocklist_txt"]`,
"local_includes": `["."]`,
}),
},

View file

@ -1225,7 +1225,7 @@ cc_library_shared {
`,
ExpectedBazelTargets: []string{
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
"features": `["ubsan_blocklist_foo_blocklist_txt"]`,
"features": `["sanitizer_blocklist_foo_blocklist_txt"]`,
"local_includes": `["."]`,
}),
},

View file

@ -1918,7 +1918,7 @@ cc_library_static {
`,
ExpectedBazelTargets: []string{
MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
"features": `["ubsan_blocklist_foo_blocklist_txt"]`,
"features": `["sanitizer_blocklist_foo_blocklist_txt"]`,
"local_includes": `["."]`,
}),
},

View file

@ -1819,7 +1819,7 @@ func bp2buildSanitizerFeatures(ctx android.BazelConversionPathContext, m *Module
if blocklist != nil {
// Format the blocklist name to be used in a feature name
blocklistFeatureSuffix := strings.Replace(strings.ToLower(*blocklist), ".", "_", -1)
features = append(features, "ubsan_blocklist_"+blocklistFeatureSuffix)
features = append(features, "sanitizer_blocklist_"+blocklistFeatureSuffix)
}
if sanitizerProps.Sanitize.Cfi != nil && !proptools.Bool(sanitizerProps.Sanitize.Cfi) {
features = append(features, "-android_cfi")