Remove duplicate code. am: cb3f890263

am: c527b4f1a8

Change-Id: I9eced5cc67b383ee5d3475731cde9a757119b2fd
This commit is contained in:
Evgenii Stepanov
2017-02-03 23:30:55 +00:00
committed by android-build-merger

View File

@@ -280,11 +280,6 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
flags.CFlags = append(flags.CFlags, asanCflags) flags.CFlags = append(flags.CFlags, asanCflags)
flags.LdFlags = append(flags.LdFlags, asanLdflags) flags.LdFlags = append(flags.LdFlags, asanLdflags)
// ASan runtime library must be the first in the link order.
runtimeLibrary := config.AddressSanitizerRuntimeLibrary(ctx.toolchain())
if runtimeLibrary != "" {
flags.libFlags = append([]string{"${config.ClangAsanLibDir}/" + runtimeLibrary}, flags.libFlags...)
}
if ctx.Host() { if ctx.Host() {
// -nodefaultlibs (provided with libc++) prevents the driver from linking // -nodefaultlibs (provided with libc++) prevents the driver from linking
// libraries needed with -fsanitize=address. http://b/18650275 (WAI) // libraries needed with -fsanitize=address. http://b/18650275 (WAI)