mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 09:31:03 +03:00
Add MSan compiler-rt library to LDC install and add it to linkerline for --fsanitize=memory (#3751)
* Add MSan compiler-rt library to LDC install and add it to linkerline for --fsanitize=memory * MSan: Add support for `-fsanitize-memory-track-origins=`
This commit is contained in:
parent
4e6c9d0ffd
commit
a5025bf83e
6 changed files with 51 additions and 5 deletions
|
@ -471,10 +471,8 @@ void ArgsBuilder::addSanitizers(const llvm::Triple &triple) {
|
|||
addFuzzLinkFlags(triple);
|
||||
}
|
||||
|
||||
// TODO: instead of this, we should link with our own sanitizer libraries
|
||||
// because LDC's LLVM version could be different from the system clang.
|
||||
if (opts::isSanitizerEnabled(opts::MemorySanitizer)) {
|
||||
args.push_back("-fsanitize=memory");
|
||||
addSanitizerLinkFlags(triple, "msan", "-fsanitize=memory");
|
||||
}
|
||||
|
||||
if (opts::isSanitizerEnabled(opts::ThreadSanitizer)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue