Merge "Don't export UBSan minimal runtime symbols."
This commit is contained in:
commit
9bf049dcbb
1 changed files with 4 additions and 1 deletions
|
@ -307,10 +307,12 @@ func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps {
|
|||
}
|
||||
|
||||
func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
minimalRuntimePath := "${config.ClangAsanLibDir}/" + config.UndefinedBehaviorSanitizerMinimalRuntimeLibrary(ctx.toolchain()) + ".a"
|
||||
minimalRuntimeLib := config.UndefinedBehaviorSanitizerMinimalRuntimeLibrary(ctx.toolchain()) + ".a"
|
||||
minimalRuntimePath := "${config.ClangAsanLibDir}/" + minimalRuntimeLib
|
||||
|
||||
if ctx.Device() && sanitize.Properties.MinimalRuntimeDep {
|
||||
flags.LdFlags = append(flags.LdFlags, minimalRuntimePath)
|
||||
flags.LdFlags = append(flags.LdFlags, "-Wl,--exclude-libs,"+minimalRuntimeLib)
|
||||
}
|
||||
if !sanitize.Properties.SanitizerEnabled && !sanitize.Properties.UbsanRuntimeDep {
|
||||
return flags
|
||||
|
@ -448,6 +450,7 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
|
|||
if enableMinimalRuntime(sanitize) {
|
||||
flags.CFlags = append(flags.CFlags, strings.Join(minimalRuntimeFlags, " "))
|
||||
flags.libFlags = append([]string{minimalRuntimePath}, flags.libFlags...)
|
||||
flags.LdFlags = append(flags.LdFlags, "-Wl,--exclude-libs,"+minimalRuntimeLib)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue