Merge "Add CFI support for assembly heavy libraries" am: 1cfd8af0a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500330 Change-Id: Icc31acef62998b571a17e73ce28f2d11dfeed0d9
This commit is contained in:
commit
07b9b74371
1 changed files with 9 additions and 0 deletions
|
@ -172,6 +172,12 @@ type SanitizeUserProps struct {
|
|||
No_recover []string
|
||||
}
|
||||
|
||||
// Sanitizers to run with flag configuration specified
|
||||
Config struct {
|
||||
// Enables CFI support flags for assembly-heavy libraries
|
||||
Cfi_assembly_support *bool `android:"arch_variant"`
|
||||
}
|
||||
|
||||
// value to pass to -fsanitize-recover=
|
||||
Recover []string
|
||||
|
||||
|
@ -543,6 +549,9 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
|
|||
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, cfiCflags...)
|
||||
flags.Local.AsFlags = append(flags.Local.AsFlags, cfiAsflags...)
|
||||
if Bool(sanitize.Properties.Sanitize.Config.Cfi_assembly_support) {
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-cfi-canonical-jump-tables")
|
||||
}
|
||||
// Only append the default visibility flag if -fvisibility has not already been set
|
||||
// to hidden.
|
||||
if !inList("-fvisibility=hidden", flags.Local.CFlags) {
|
||||
|
|
Loading…
Reference in a new issue