Add support for LLD 6.0.0

This commit is contained in:
Martin 2018-03-09 01:01:31 +01:00
parent 63034ae1ca
commit f5f17bee6f
2 changed files with 24 additions and 4 deletions

View file

@ -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");