mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Add support for LLD 6.0.0
This commit is contained in:
parent
63034ae1ca
commit
f5f17bee6f
2 changed files with 24 additions and 4 deletions
|
@ -18,8 +18,12 @@
|
|||
#include "llvm/Support/FileSystem.h"
|
||||
|
||||
#if LDC_WITH_LLD
|
||||
#if LDC_LLVM_VER >= 600
|
||||
#include "lld/Common/Driver.h"
|
||||
#else
|
||||
#include "lld/Driver/Driver.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -194,7 +198,11 @@ int linkObjToBinaryMSVC(llvm::StringRef outputPath, bool useInternalLinker,
|
|||
const auto fullArgs =
|
||||
getFullArgs("lld-link.exe", args, global.params.verbose);
|
||||
|
||||
#if LDC_LLVM_VER >= 600
|
||||
const bool success = lld::coff::link(fullArgs, /*CanExitEarly=*/false);
|
||||
#else
|
||||
const bool success = lld::coff::link(fullArgs);
|
||||
#endif
|
||||
if (!success)
|
||||
error(Loc(), "linking with LLD failed");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue