Merge "Add option to disable Scudo globally [Soong]"
This commit is contained in:
@@ -665,6 +665,10 @@ func (c *config) EnableCFI() bool {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *config) DisableScudo() bool {
|
||||
return Bool(c.productVariables.DisableScudo)
|
||||
}
|
||||
|
||||
func (c *config) EnableXOM() bool {
|
||||
if c.productVariables.EnableXOM == nil {
|
||||
return true
|
||||
|
@@ -213,6 +213,8 @@ type productVariables struct {
|
||||
CFIExcludePaths []string `json:",omitempty"`
|
||||
CFIIncludePaths []string `json:",omitempty"`
|
||||
|
||||
DisableScudo *bool `json:",omitempty"`
|
||||
|
||||
EnableXOM *bool `json:",omitempty"`
|
||||
XOMExcludePaths []string `json:",omitempty"`
|
||||
|
||||
|
@@ -370,8 +370,8 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
||||
sanitize.Properties.SanitizerEnabled = true
|
||||
}
|
||||
|
||||
// Disable Scudo if ASan or TSan is enabled.
|
||||
if Bool(s.Address) || Bool(s.Thread) || Bool(s.Hwaddress) {
|
||||
// Disable Scudo if ASan or TSan is enabled, or if it's disabled globally.
|
||||
if Bool(s.Address) || Bool(s.Thread) || Bool(s.Hwaddress) || ctx.Config().DisableScudo() {
|
||||
s.Scudo = nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user