Merge "Hide CFI behind a global flag." am: 97673c06d8
am: df4d484416
Change-Id: I397df9a72bc73a8bbda23b28ad12406653b9fbe3
This commit is contained in:
@@ -398,6 +398,10 @@ func (c *config) SanitizeDeviceArch() []string {
|
||||
return append([]string(nil), c.ProductVariables.SanitizeDeviceArch...)
|
||||
}
|
||||
|
||||
func (c *config) EnableCFI() bool {
|
||||
return Bool(c.ProductVariables.EnableCFI)
|
||||
}
|
||||
|
||||
func (c *config) Android64() bool {
|
||||
for _, t := range c.Targets[Device] {
|
||||
if t.Arch.ArchType.Multilib == "lib64" {
|
||||
|
@@ -124,6 +124,7 @@ type productVariables struct {
|
||||
UseGoma *bool `json:",omitempty"`
|
||||
Debuggable *bool `json:",omitempty"`
|
||||
Eng *bool `json:",omitempty"`
|
||||
EnableCFI *bool `json:",omitempty"`
|
||||
|
||||
VendorPath *string `json:",omitempty"`
|
||||
|
||||
|
@@ -161,6 +161,11 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
||||
}
|
||||
}
|
||||
|
||||
if !ctx.AConfig().EnableCFI() {
|
||||
s.Cfi = nil
|
||||
s.Diag.Cfi = nil
|
||||
}
|
||||
|
||||
if ctx.staticBinary() {
|
||||
s.Address = nil
|
||||
s.Coverage = nil
|
||||
|
Reference in New Issue
Block a user