Merge "Support sanitizing a single device arch"
This commit is contained in:
commit
42e04de8a7
|
@ -357,17 +357,15 @@ func (c *config) SkipDeviceInstall() bool {
|
|||
}
|
||||
|
||||
func (c *config) SanitizeHost() []string {
|
||||
if c.ProductVariables.SanitizeHost == nil {
|
||||
return nil
|
||||
}
|
||||
return append([]string(nil), *c.ProductVariables.SanitizeHost...)
|
||||
return append([]string(nil), c.ProductVariables.SanitizeHost...)
|
||||
}
|
||||
|
||||
func (c *config) SanitizeDevice() []string {
|
||||
if c.ProductVariables.SanitizeDevice == nil {
|
||||
return nil
|
||||
}
|
||||
return append([]string(nil), *c.ProductVariables.SanitizeDevice...)
|
||||
return append([]string(nil), c.ProductVariables.SanitizeDevice...)
|
||||
}
|
||||
|
||||
func (c *config) SanitizeDeviceArch() []string {
|
||||
return append([]string(nil), c.ProductVariables.SanitizeDeviceArch...)
|
||||
}
|
||||
|
||||
func (c *config) Android64() bool {
|
||||
|
|
|
@ -118,8 +118,9 @@ type productVariables struct {
|
|||
DevicePrefer32BitExecutables *bool `json:",omitempty"`
|
||||
HostPrefer32BitExecutables *bool `json:",omitempty"`
|
||||
|
||||
SanitizeHost *[]string `json:",omitempty"`
|
||||
SanitizeDevice *[]string `json:",omitempty"`
|
||||
SanitizeHost []string `json:",omitempty"`
|
||||
SanitizeDevice []string `json:",omitempty"`
|
||||
SanitizeDeviceArch []string `json:",omitempty"`
|
||||
}
|
||||
|
||||
func boolPtr(v bool) *bool {
|
||||
|
|
|
@ -119,9 +119,12 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
|||
if ctx.Host() {
|
||||
globalSanitizers = ctx.AConfig().SanitizeHost()
|
||||
} else {
|
||||
arches := ctx.AConfig().SanitizeDeviceArch()
|
||||
if len(arches) == 0 || inList(ctx.Arch().ArchType.Name, arches) {
|
||||
globalSanitizers = ctx.AConfig().SanitizeDevice()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(globalSanitizers) > 0 {
|
||||
var found bool
|
||||
|
|
Loading…
Reference in New Issue