Reapply r327026 (partially):

Merge lld trunk r321017 to contrib/llvm/tools/lld.

(Note that in this merge, I foolishly combined upstream changes with
this local change. But only this ifdef part is really needed, as we
always default to ELF link mode.)
This commit is contained in:
Dimitry Andric 2020-08-02 18:34:29 +00:00
parent dd6565b7a6
commit 59948e95d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang1100-import/; revision=363779

View File

@ -142,6 +142,9 @@ int main(int argc, const char **argv) {
InitLLVM x(argc, argv);
std::vector<const char *> args(argv, argv + argc);
#ifdef __FreeBSD__
return !elf::link(args, canExitEarly(), llvm::outs(), llvm::errs());
#else
switch (parseFlavor(args)) {
case Gnu:
if (isPETarget(args))
@ -160,4 +163,5 @@ int main(int argc, const char **argv) {
"Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld"
" (WebAssembly) instead");
}
#endif
}