forked from OSchip/llvm-project
OpenBSD driver needs ld.lld in sanitizer context
Base GNU ld is pretty ancient and does not support --dynamic-list flag. For conveniency, we can it automatically when compile with ubsan sanitizer flag. Reviewers: dberris Reviewed by: dberris Differential Revision: https://reviews.llvm.org/D48574 llvm-svn: 335856
This commit is contained in:
parent
e666545a71
commit
11f1d7e9e4
|
@ -230,7 +230,9 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
Args.MakeArgString(getToolChain().GetFilePath("crtendS.o")));
|
||||
}
|
||||
|
||||
const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());
|
||||
const char *Exec = Args.MakeArgString(
|
||||
!NeedsSanitizerDeps ? getToolChain().GetLinkerPath()
|
||||
: getToolChain().GetProgramPath("ld.lld"));
|
||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue