Merge "Hide CFI behind a global flag."
This commit is contained in:
@@ -398,6 +398,10 @@ func (c *config) SanitizeDeviceArch() []string {
|
|||||||
return append([]string(nil), c.ProductVariables.SanitizeDeviceArch...)
|
return append([]string(nil), c.ProductVariables.SanitizeDeviceArch...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *config) EnableCFI() bool {
|
||||||
|
return Bool(c.ProductVariables.EnableCFI)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *config) Android64() bool {
|
func (c *config) Android64() bool {
|
||||||
for _, t := range c.Targets[Device] {
|
for _, t := range c.Targets[Device] {
|
||||||
if t.Arch.ArchType.Multilib == "lib64" {
|
if t.Arch.ArchType.Multilib == "lib64" {
|
||||||
|
@@ -124,6 +124,7 @@ type productVariables struct {
|
|||||||
UseGoma *bool `json:",omitempty"`
|
UseGoma *bool `json:",omitempty"`
|
||||||
Debuggable *bool `json:",omitempty"`
|
Debuggable *bool `json:",omitempty"`
|
||||||
Eng *bool `json:",omitempty"`
|
Eng *bool `json:",omitempty"`
|
||||||
|
EnableCFI *bool `json:",omitempty"`
|
||||||
|
|
||||||
VendorPath *string `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() {
|
if ctx.staticBinary() {
|
||||||
s.Address = nil
|
s.Address = nil
|
||||||
s.Coverage = nil
|
s.Coverage = nil
|
||||||
|
Reference in New Issue
Block a user