Allow cfi enabled modules in mixed build.
Bug: None Test: Locally tested Change-Id: I53c4ad8428cf05ceee3d73b4f97c2b9db2285c38
This commit is contained in:
3
cc/cc.go
3
cc/cc.go
@@ -1916,7 +1916,6 @@ func allEnabledSanitizersSupportedByBazel(c *Module) bool {
|
|||||||
|
|
||||||
unsupportedSanitizers := []*bool{
|
unsupportedSanitizers := []*bool{
|
||||||
sanitizeProps.Safestack,
|
sanitizeProps.Safestack,
|
||||||
sanitizeProps.Cfi,
|
|
||||||
sanitizeProps.Scudo,
|
sanitizeProps.Scudo,
|
||||||
BoolPtr(len(c.sanitize.Properties.Sanitize.Recover) > 0),
|
BoolPtr(len(c.sanitize.Properties.Sanitize.Recover) > 0),
|
||||||
BoolPtr(c.sanitize.Properties.Sanitize.Blocklist != nil),
|
BoolPtr(c.sanitize.Properties.Sanitize.Blocklist != nil),
|
||||||
@@ -1935,6 +1934,8 @@ func allEnabledSanitizersSupportedByBazel(c *Module) bool {
|
|||||||
if ubsanEnabled && !c.MinimalRuntimeNeeded() {
|
if ubsanEnabled && !c.MinimalRuntimeNeeded() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
} else if san == cfi {
|
||||||
|
continue
|
||||||
} else if c.sanitize.isSanitizerEnabled(san) {
|
} else if c.sanitize.isSanitizerEnabled(san) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@@ -5538,7 +5538,7 @@ func TestDisableSanitizerVariantsInMixedBuilds(t *testing.T) {
|
|||||||
name: "foo_cfi",
|
name: "foo_cfi",
|
||||||
variant: "android_arm64_armv8-a_static_cfi_apex28",
|
variant: "android_arm64_armv8-a_static_cfi_apex28",
|
||||||
expectedOutputPaths: []string{
|
expectedOutputPaths: []string{
|
||||||
"out/soong/.intermediates/foo_cfi/android_arm64_armv8-a_static_cfi_apex28/foo_cfi.a",
|
"outputbase/execroot/__main__/foo_cfi.a",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user