1
Fork 0

Enable ASan, TSan, UBSan for aarch64-apple-darwin.

This commit is contained in:
Corey Farwell 2020-12-09 23:53:53 -05:00
parent 58d2bad9f7
commit 5940c19315
4 changed files with 19 additions and 5 deletions

View file

@ -819,7 +819,8 @@ fn link_sanitizer_runtime(sess: &Session, linker: &mut dyn Linker, name: &str) {
.unwrap_or_default();
match sess.opts.target_triple.triple() {
"x86_64-apple-darwin" => {
"aarch64-apple-darwin"
| "x86_64-apple-darwin" => {
// On Apple platforms, the sanitizer is always built as a dylib, and
// LLVM will link to `@rpath/*.dylib`, so we need to specify an
// rpath to the library as well (the rpath should be absolute, see