Merge "Add BuiltinsRuntimeLibrary"
am: e944600978
Change-Id: I009085ecc3b340db8a92154ead624c5059ffdcdc
This commit is contained in:
commit
ec11aef9cd
|
@ -238,7 +238,7 @@ func (t *toolchainArm64) ToolchainClangCflags() string {
|
||||||
return t.toolchainClangCflags
|
return t.toolchainClangCflags
|
||||||
}
|
}
|
||||||
|
|
||||||
func (toolchainArm64) SanitizerRuntimeLibraryArch() string {
|
func (toolchainArm64) LibclangRuntimeLibraryArch() string {
|
||||||
return "aarch64"
|
return "aarch64"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,7 +397,7 @@ func (t *toolchainArm) ClangInstructionSetFlags(isa string) (string, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (toolchainArm) SanitizerRuntimeLibraryArch() string {
|
func (toolchainArm) LibclangRuntimeLibraryArch() string {
|
||||||
return "arm"
|
return "arm"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ func (t *toolchainMips64) ClangLldflags() string {
|
||||||
return "${config.Mips64ClangLdflags}"
|
return "${config.Mips64ClangLdflags}"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (toolchainMips64) SanitizerRuntimeLibraryArch() string {
|
func (toolchainMips64) LibclangRuntimeLibraryArch() string {
|
||||||
return "mips64"
|
return "mips64"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,7 +210,7 @@ func (t *toolchainMips) ClangLldflags() string {
|
||||||
return "${config.MipsClangLdflags}"
|
return "${config.MipsClangLdflags}"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (toolchainMips) SanitizerRuntimeLibraryArch() string {
|
func (toolchainMips) LibclangRuntimeLibraryArch() string {
|
||||||
return "mips"
|
return "mips"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ type Toolchain interface {
|
||||||
ShlibSuffix() string
|
ShlibSuffix() string
|
||||||
ExecutableSuffix() string
|
ExecutableSuffix() string
|
||||||
|
|
||||||
SanitizerRuntimeLibraryArch() string
|
LibclangRuntimeLibraryArch() string
|
||||||
|
|
||||||
AvailableLibraries() []string
|
AvailableLibraries() []string
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ func (toolchainBase) WindresFlags() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (toolchainBase) SanitizerRuntimeLibraryArch() string {
|
func (toolchainBase) LibclangRuntimeLibraryArch() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,44 +214,48 @@ func addPrefix(list []string, prefix string) []string {
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
func SanitizerRuntimeLibrary(t Toolchain, sanitizer string) string {
|
func LibclangRuntimeLibrary(t Toolchain, library string) string {
|
||||||
arch := t.SanitizerRuntimeLibraryArch()
|
arch := t.LibclangRuntimeLibraryArch()
|
||||||
if arch == "" {
|
if arch == "" {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return "libclang_rt." + sanitizer + "-" + arch + "-android"
|
return "libclang_rt." + library + "-" + arch + "-android"
|
||||||
|
}
|
||||||
|
|
||||||
|
func BuiltinsRuntimeLibrary(t Toolchain) string {
|
||||||
|
return LibclangRuntimeLibrary(t, "builtins")
|
||||||
}
|
}
|
||||||
|
|
||||||
func AddressSanitizerRuntimeLibrary(t Toolchain) string {
|
func AddressSanitizerRuntimeLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "asan")
|
return LibclangRuntimeLibrary(t, "asan")
|
||||||
}
|
}
|
||||||
|
|
||||||
func HWAddressSanitizerRuntimeLibrary(t Toolchain) string {
|
func HWAddressSanitizerRuntimeLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "hwasan")
|
return LibclangRuntimeLibrary(t, "hwasan")
|
||||||
}
|
}
|
||||||
|
|
||||||
func HWAddressSanitizerStaticLibrary(t Toolchain) string {
|
func HWAddressSanitizerStaticLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "hwasan_static")
|
return LibclangRuntimeLibrary(t, "hwasan_static")
|
||||||
}
|
}
|
||||||
|
|
||||||
func UndefinedBehaviorSanitizerRuntimeLibrary(t Toolchain) string {
|
func UndefinedBehaviorSanitizerRuntimeLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "ubsan_standalone")
|
return LibclangRuntimeLibrary(t, "ubsan_standalone")
|
||||||
}
|
}
|
||||||
|
|
||||||
func UndefinedBehaviorSanitizerMinimalRuntimeLibrary(t Toolchain) string {
|
func UndefinedBehaviorSanitizerMinimalRuntimeLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "ubsan_minimal")
|
return LibclangRuntimeLibrary(t, "ubsan_minimal")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ThreadSanitizerRuntimeLibrary(t Toolchain) string {
|
func ThreadSanitizerRuntimeLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "tsan")
|
return LibclangRuntimeLibrary(t, "tsan")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ProfileRuntimeLibrary(t Toolchain) string {
|
func ProfileRuntimeLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "profile")
|
return LibclangRuntimeLibrary(t, "profile")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ScudoRuntimeLibrary(t Toolchain) string {
|
func ScudoRuntimeLibrary(t Toolchain) string {
|
||||||
return SanitizerRuntimeLibrary(t, "scudo")
|
return LibclangRuntimeLibrary(t, "scudo")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToolPath(t Toolchain) string {
|
func ToolPath(t Toolchain) string {
|
||||||
|
|
|
@ -227,7 +227,7 @@ func (t *toolchainX86_64) YasmFlags() string {
|
||||||
return "${config.X86_64YasmFlags}"
|
return "${config.X86_64YasmFlags}"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (toolchainX86_64) SanitizerRuntimeLibraryArch() string {
|
func (toolchainX86_64) LibclangRuntimeLibraryArch() string {
|
||||||
return "x86_64"
|
return "x86_64"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ func (t *toolchainX86) YasmFlags() string {
|
||||||
return "${config.X86YasmFlags}"
|
return "${config.X86YasmFlags}"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (toolchainX86) SanitizerRuntimeLibraryArch() string {
|
func (toolchainX86) LibclangRuntimeLibraryArch() string {
|
||||||
return "i686"
|
return "i686"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue