Loading android/config.go +7 −0 Original line number Diff line number Diff line Loading @@ -1571,6 +1571,13 @@ func (c *config) MemtagHeapSyncEnabledForPath(path string) bool { return HasAnyPrefix(path, c.productVariables.MemtagHeapSyncIncludePaths) && !c.MemtagHeapDisabledForPath(path) } func (c *config) HWASanEnabledForPath(path string) bool { if len(c.productVariables.HWASanIncludePaths) == 0 { return false } return HasAnyPrefix(path, c.productVariables.HWASanIncludePaths) } func (c *config) VendorConfig(name string) VendorConfig { return soongconfig.Config(c.productVariables.VendorVars[name]) } Loading android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,8 @@ type productVariables struct { MemtagHeapAsyncIncludePaths []string `json:",omitempty"` MemtagHeapSyncIncludePaths []string `json:",omitempty"` HWASanIncludePaths []string `json:",omitempty"` VendorPath *string `json:",omitempty"` OdmPath *string `json:",omitempty"` ProductPath *string `json:",omitempty"` Loading cc/sanitize.go +6 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,12 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { } } // Enable HWASan for all components in the include paths (for Aarch64 only) if s.Hwaddress == nil && ctx.Config().HWASanEnabledForPath(ctx.ModuleDir()) && ctx.Arch().ArchType == android.Arm64 && ctx.toolchain().Bionic() { s.Hwaddress = proptools.BoolPtr(true) } // Enable CFI for non-host components in the include paths if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && !ctx.Host() { s.Cfi = proptools.BoolPtr(true) Loading Loading
android/config.go +7 −0 Original line number Diff line number Diff line Loading @@ -1571,6 +1571,13 @@ func (c *config) MemtagHeapSyncEnabledForPath(path string) bool { return HasAnyPrefix(path, c.productVariables.MemtagHeapSyncIncludePaths) && !c.MemtagHeapDisabledForPath(path) } func (c *config) HWASanEnabledForPath(path string) bool { if len(c.productVariables.HWASanIncludePaths) == 0 { return false } return HasAnyPrefix(path, c.productVariables.HWASanIncludePaths) } func (c *config) VendorConfig(name string) VendorConfig { return soongconfig.Config(c.productVariables.VendorVars[name]) } Loading
android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,8 @@ type productVariables struct { MemtagHeapAsyncIncludePaths []string `json:",omitempty"` MemtagHeapSyncIncludePaths []string `json:",omitempty"` HWASanIncludePaths []string `json:",omitempty"` VendorPath *string `json:",omitempty"` OdmPath *string `json:",omitempty"` ProductPath *string `json:",omitempty"` Loading
cc/sanitize.go +6 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,12 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { } } // Enable HWASan for all components in the include paths (for Aarch64 only) if s.Hwaddress == nil && ctx.Config().HWASanEnabledForPath(ctx.ModuleDir()) && ctx.Arch().ArchType == android.Arm64 && ctx.toolchain().Bionic() { s.Hwaddress = proptools.BoolPtr(true) } // Enable CFI for non-host components in the include paths if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && !ctx.Host() { s.Cfi = proptools.BoolPtr(true) Loading