mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Support sanitizers on aarch64-unknown-linux-gnu
This commit is contained in:
parent
033013cab3
commit
2851c9ffb5
@ -804,7 +804,10 @@ fn link_sanitizer_runtime(sess: &Session, linker: &mut dyn Linker, name: &str) {
|
||||
linker.args(&["-Wl,-rpath", "-Xlinker", rpath]);
|
||||
linker.link_dylib(Symbol::intern(&libname));
|
||||
}
|
||||
"x86_64-unknown-linux-gnu" | "x86_64-fuchsia" | "aarch64-fuchsia" => {
|
||||
"aarch64-fuchsia"
|
||||
| "aarch64-unknown-linux-gnu"
|
||||
| "x86_64-fuchsia"
|
||||
| "x86_64-unknown-linux-gnu" => {
|
||||
let filename = format!("librustc{}_rt.{}.a", channel, name);
|
||||
let path = default_tlib.join(&filename);
|
||||
linker.link_whole_rlib(&path);
|
||||
|
@ -1349,11 +1349,19 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
|
||||
);
|
||||
}
|
||||
|
||||
const ASAN_SUPPORTED_TARGETS: &[&str] =
|
||||
&["aarch64-fuchsia", "x86_64-apple-darwin", "x86_64-fuchsia", "x86_64-unknown-linux-gnu"];
|
||||
const LSAN_SUPPORTED_TARGETS: &[&str] = &["x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
const MSAN_SUPPORTED_TARGETS: &[&str] = &["x86_64-unknown-linux-gnu"];
|
||||
const TSAN_SUPPORTED_TARGETS: &[&str] = &["x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
const ASAN_SUPPORTED_TARGETS: &[&str] = &[
|
||||
"aarch64-fuchsia",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"x86_64-apple-darwin",
|
||||
"x86_64-fuchsia",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
];
|
||||
const LSAN_SUPPORTED_TARGETS: &[&str] =
|
||||
&["aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
const MSAN_SUPPORTED_TARGETS: &[&str] =
|
||||
&["aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"];
|
||||
const TSAN_SUPPORTED_TARGETS: &[&str] =
|
||||
&["aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
|
||||
// Sanitizers can only be used on some tested platforms.
|
||||
for s in sess.opts.debugging_opts.sanitizer {
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: `-Zsanitizer=leak` only works with targets: x86_64-apple-darwin, x86_64-unknown-linux-gnu
|
||||
error: `-Zsanitizer=leak` only works with targets: aarch64-unknown-linux-gnu, x86_64-apple-darwin, x86_64-unknown-linux-gnu
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -82,16 +82,22 @@ const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
|
||||
("xcore", "xcore"),
|
||||
];
|
||||
|
||||
pub const ASAN_SUPPORTED_TARGETS: &'static [&'static str] =
|
||||
&["aarch64-fuchsia", "x86_64-apple-darwin", "x86_64-fuchsia", "x86_64-unknown-linux-gnu"];
|
||||
pub const ASAN_SUPPORTED_TARGETS: &'static [&'static str] = &[
|
||||
"aarch64-fuchsia",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"x86_64-apple-darwin",
|
||||
"x86_64-fuchsia",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
];
|
||||
|
||||
pub const LSAN_SUPPORTED_TARGETS: &'static [&'static str] =
|
||||
&["x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
&["aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
|
||||
pub const MSAN_SUPPORTED_TARGETS: &'static [&'static str] = &["x86_64-unknown-linux-gnu"];
|
||||
pub const MSAN_SUPPORTED_TARGETS: &'static [&'static str] =
|
||||
&["aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"];
|
||||
|
||||
pub const TSAN_SUPPORTED_TARGETS: &'static [&'static str] =
|
||||
&["x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
&["aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
|
||||
|
||||
pub fn matches_os(triple: &str, name: &str) -> bool {
|
||||
// For the wasm32 bare target we ignore anything also ignored on emscripten
|
||||
|
Loading…
Reference in New Issue
Block a user