]> git.lizzy.rs Git - rust.git/commit
Auto merge of #41352 - kennytm:macos-sanitizers, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 26 Apr 2017 12:34:45 +0000 (12:34 +0000)
committerbors <bors@rust-lang.org>
Wed, 26 Apr 2017 12:34:45 +0000 (12:34 +0000)
commit0ee56f686db4c3657ab99d2a261314f749245593
treeaff354fa377e1c0c8d059f68c9667556cdee56e2
parentb0a4074c5e87d24ff630f6aa456a64698bff3ed2
parent164fd696bf9db696148018f395ad703a5825246e
Auto merge of #41352 - kennytm:macos-sanitizers, r=alexcrichton

Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin

[ASan](https://clang.llvm.org/docs/AddressSanitizer.html#supported-platforms) and [TSan](https://clang.llvm.org/docs/ThreadSanitizer.html#supported-platforms) are supported on macOS, and this commit enables their support.

The sanitizers are always built as `*.dylib` on Apple platforms, so they cannot be statically linked into the corresponding `rustc_?san.rlib`. The dylibs are directly copied to `lib/rustlib/x86_64-apple-darwin/lib/` instead.

Note, although Xcode also ships with their own copies of ASan/TSan dylibs, we cannot use them due to version mismatch.

----

~~There is a caveat: the sanitizer libraries are linked as `@rpath/` (due to https://reviews.llvm.org/D6018), so the user needs to additionally pass `-C rpath`:~~

**Edit:** Passing rpath is now automatic.