Merge "Export TSAN_RUNTIME_LIBRARY make variable"
This commit is contained in:
commit
9e3f627ea7
2 changed files with 12 additions and 7 deletions
|
@ -207,20 +207,24 @@ func inList(s string, list []string) bool {
|
|||
return indexList(s, list) != -1
|
||||
}
|
||||
|
||||
func AddressSanitizerRuntimeLibrary(t Toolchain) string {
|
||||
func SanitizerRuntimeLibrary(t Toolchain, sanitizer string) string {
|
||||
arch := t.SanitizerRuntimeLibraryArch()
|
||||
if arch == "" {
|
||||
return ""
|
||||
}
|
||||
return "libclang_rt.asan-" + arch + "-android.so"
|
||||
return "libclang_rt." + sanitizer + "-" + arch + "-android.so"
|
||||
}
|
||||
|
||||
func AddressSanitizerRuntimeLibrary(t Toolchain) string {
|
||||
return SanitizerRuntimeLibrary(t, "asan")
|
||||
}
|
||||
|
||||
func UndefinedBehaviorSanitizerRuntimeLibrary(t Toolchain) string {
|
||||
arch := t.SanitizerRuntimeLibraryArch()
|
||||
if arch == "" {
|
||||
return ""
|
||||
}
|
||||
return "libclang_rt.ubsan_standalone-" + arch + "-android.so"
|
||||
return SanitizerRuntimeLibrary(t, "ubsan_standalone")
|
||||
}
|
||||
|
||||
func ThreadSanitizerRuntimeLibrary(t Toolchain) string {
|
||||
return SanitizerRuntimeLibrary(t, "tsan")
|
||||
}
|
||||
|
||||
func ToolPath(t Toolchain) string {
|
||||
|
|
|
@ -209,6 +209,7 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
|
|||
if target.Os.Class == android.Device {
|
||||
ctx.Strict(secondPrefix+"ADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.AddressSanitizerRuntimeLibrary(toolchain), ".so"))
|
||||
ctx.Strict(secondPrefix+"UBSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerRuntimeLibrary(toolchain), ".so"))
|
||||
ctx.Strict(secondPrefix+"TSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.ThreadSanitizerRuntimeLibrary(toolchain), ".so"))
|
||||
}
|
||||
|
||||
// This is used by external/gentoo/...
|
||||
|
|
Loading…
Reference in a new issue