Skip to content

Commit

Permalink
Auto merge of #88454 - devnexen:sunos_asan, r=wesleywiser
Browse files Browse the repository at this point in the history
sunos systems add sanitizer supported.
  • Loading branch information
bors committed Sep 3, 2021
2 parents 577a76f + 8539a3c commit 4878034
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_target/src/spec/x86_64_pc_solaris.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{LinkerFlavor, StackProbeType, Target};
use crate::spec::{LinkerFlavor, SanitizerSet, StackProbeType, Target};

pub fn target() -> Target {
let mut base = super::solaris_base::opts();
Expand All @@ -8,6 +8,7 @@ pub fn target() -> Target {
base.max_atomic_width = Some(64);
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
base.stack_probes = StackProbeType::Call;
base.supported_sanitizers = SanitizerSet::ADDRESS;

Target {
llvm_target: "x86_64-pc-solaris".to_string(),
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use crate::spec::{LinkerFlavor, Target};
use crate::spec::{LinkerFlavor, SanitizerSet, Target};

pub fn target() -> Target {
let mut base = super::illumos_base::opts();
base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string(), "-std=c99".to_string()]);
base.cpu = "x86-64".to_string();
base.max_atomic_width = Some(64);
base.supported_sanitizers = SanitizerSet::ADDRESS;

Target {
// LLVM does not currently have a separate illumos target,
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,8 @@ fn supported_sanitizers(
"x86_64-unknown-netbsd" => {
common_libs("netbsd", "x86_64", &["asan", "lsan", "msan", "tsan"])
}
"x86_64-unknown-illumos" => common_libs("illumos", "x86_64", &["asan"]),
"x86_64-pc-solaris" => common_libs("solaris", "x86_64", &["asan"]),
"x86_64-unknown-linux-gnu" => {
common_libs("linux", "x86_64", &["asan", "lsan", "msan", "tsan"])
}
Expand Down

0 comments on commit 4878034

Please sign in to comment.