Auto merge of #87664 - devnexen:netbsd_sanitizers_support, r=nagisa

netbsd x86_64 arch enable supported sanitizers.
This commit is contained in:
bors 2021-08-01 14:16:37 +00:00
commit 2e9c8705e9
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,4 @@
use crate::spec::{LinkerFlavor, StackProbeType, Target, TargetOptions}; use crate::spec::{LinkerFlavor, SanitizerSet, StackProbeType, Target, TargetOptions};
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::netbsd_base::opts(); let mut base = super::netbsd_base::opts();
@ -7,6 +7,8 @@ pub fn target() -> Target {
base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".to_string()); base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".to_string());
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved // don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
base.stack_probes = StackProbeType::Call; base.stack_probes = StackProbeType::Call;
base.supported_sanitizers =
SanitizerSet::ADDRESS | SanitizerSet::LEAK | SanitizerSet::MEMORY | SanitizerSet::THREAD;
Target { Target {
llvm_target: "x86_64-unknown-netbsd".to_string(), llvm_target: "x86_64-unknown-netbsd".to_string(),

View File

@ -821,6 +821,9 @@ fn supported_sanitizers(
"x86_64-apple-darwin" => darwin_libs("osx", &["asan", "lsan", "tsan"]), "x86_64-apple-darwin" => darwin_libs("osx", &["asan", "lsan", "tsan"]),
"x86_64-fuchsia" => common_libs("fuchsia", "x86_64", &["asan"]), "x86_64-fuchsia" => common_libs("fuchsia", "x86_64", &["asan"]),
"x86_64-unknown-freebsd" => common_libs("freebsd", "x86_64", &["asan", "msan", "tsan"]), "x86_64-unknown-freebsd" => common_libs("freebsd", "x86_64", &["asan", "msan", "tsan"]),
"x86_64-unknown-netbsd" => {
common_libs("netbsd", "x86_64", &["asan", "lsan", "msan", "tsan"])
}
"x86_64-unknown-linux-gnu" => { "x86_64-unknown-linux-gnu" => {
common_libs("linux", "x86_64", &["asan", "lsan", "msan", "tsan"]) common_libs("linux", "x86_64", &["asan", "lsan", "msan", "tsan"])
} }