aboutsummaryrefslogtreecommitdiffstats
path: root/cc/sanitize.go
diff options
context:
space:
mode:
authorEvgenii Stepanov <eugenis@google.com>2016-08-15 14:18:24 -0700
committerEvgenii Stepanov <eugenis@google.com>2016-08-15 17:05:04 -0700
commitaf36db11786362ed7aa3547c9dd10b31f1a04cde (patch)
tree51faff6a80251850a6c0c3cdc2dd35db0390e120 /cc/sanitize.go
parent9883461664fe73c31b382ed201514d580172626d (diff)
downloadbuild_soong-af36db11786362ed7aa3547c9dd10b31f1a04cde.tar.gz
build_soong-af36db11786362ed7aa3547c9dd10b31f1a04cde.tar.bz2
build_soong-af36db11786362ed7aa3547c9dd10b31f1a04cde.zip
Add ubsan_standalone library name to the toolchain.
and export the library name to make. Refactor the code a bit to avoid repeating the library name multiple times. Bug: 22033465 Test: Ran external/clang/build.py for aosp-llvm Change-Id: I25eb3858eb92e1dd493b09524d559802551b2547
Diffstat (limited to 'cc/sanitize.go')
-rw-r--r--cc/sanitize.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/sanitize.go b/cc/sanitize.go
index b79e0c74..8023933c 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -21,6 +21,7 @@ import (
"github.com/google/blueprint"
"android/soong/android"
+ "android/soong/cc/config"
)
type sanitizerType int
@@ -239,7 +240,7 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
flags.LdFlags = append(flags.LdFlags, "-Wl,-u,__asan_preinit")
// ASan runtime library must be the first in the link order.
- runtimeLibrary := ctx.toolchain().AddressSanitizerRuntimeLibrary()
+ runtimeLibrary := config.AddressSanitizerRuntimeLibrary(ctx.toolchain())
if runtimeLibrary != "" {
flags.libFlags = append([]string{"${config.ClangAsanLibDir}/" + runtimeLibrary}, flags.libFlags...)
}