Merge remote-tracking branch 'origin/master' into merge-2.064

This commit is contained in:
Kai Nacke
2013-11-05 13:41:18 +01:00
3 changed files with 91 additions and 0 deletions

View File

@@ -137,6 +137,21 @@ static int linkObjToBinaryGcc(bool sharedLib)
// create path to exe
CreateDirectoryOnDisk(gExePath);
#if LDC_LLVM_VER >= 303
// Pass sanitizer arguments to linker. Requires clang.
if (opts::sanitize == opts::AddressSanitizer) {
args.push_back("-fsanitize=address");
}
if (opts::sanitize == opts::MemorySanitizer) {
args.push_back("-fsanitize=memory");
}
if (opts::sanitize == opts::ThreadSanitizer) {
args.push_back("-fsanitize=thread");
}
#endif
// additional linker switches
for (unsigned i = 0; i < global.params.linkswitches->dim; i++)
{