Skip to content

Commit

Permalink
sunos systems add sanitizer supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Aug 30, 2021
1 parent 757a65b commit 8539a3c
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 8539a3c

Please sign in to comment.