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:
parent
dd6565b7a6
commit
59948e95d8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/clang1100-import/; revision=363779
@ -142,6 +142,9 @@ int main(int argc, const char **argv) {
|
|||||||
InitLLVM x(argc, argv);
|
InitLLVM x(argc, argv);
|
||||||
|
|
||||||
std::vector<const char *> args(argv, argv + argc);
|
std::vector<const char *> args(argv, argv + argc);
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
return !elf::link(args, canExitEarly(), llvm::outs(), llvm::errs());
|
||||||
|
#else
|
||||||
switch (parseFlavor(args)) {
|
switch (parseFlavor(args)) {
|
||||||
case Gnu:
|
case Gnu:
|
||||||
if (isPETarget(args))
|
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"
|
"Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld"
|
||||||
" (WebAssembly) instead");
|
" (WebAssembly) instead");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user