Explicitly disable CFI in bp2build when false
In Soong, CFI being explicitly set to false overrides presence in CFI_INCLUDE_PATHS, so this change causes Bazel to mimic the same precedence. Bug: 278789968 Test: Unit tests Change-Id: I827b3d4272eac2002031970f1e67c9321979b14b
This commit is contained in:
@@ -2165,3 +2165,23 @@ cc_library_static {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestCcLibraryStaticExplicitlyDisablesCfiWhenFalse(t *testing.T) {
|
||||
runCcLibraryStaticTestCase(t, Bp2buildTestCase{
|
||||
Description: "cc_library_static disables cfi when explciitly set to false in the bp",
|
||||
Blueprint: `
|
||||
cc_library_static {
|
||||
name: "foo",
|
||||
sanitize: {
|
||||
cfi: false,
|
||||
},
|
||||
}
|
||||
`,
|
||||
ExpectedBazelTargets: []string{
|
||||
MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
|
||||
"features": `["-android_cfi"]`,
|
||||
"local_includes": `["."]`,
|
||||
}),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user