mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
getClosestStaticTargetForModule was replaced with lookupTarget
Build fix for LLVM r77111.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "gen/llvmhelpers.h"
|
||||
#include "gen/llvm.h"
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
|
||||
#include "mars.h"
|
||||
#include "init.h"
|
||||
|
||||
@@ -442,7 +442,7 @@ LDC_TARGETS
|
||||
if (mArch.empty())
|
||||
{
|
||||
std::string Err;
|
||||
theTarget = llvm::TargetRegistry::getClosestStaticTargetForModule(mod, Err);
|
||||
theTarget = llvm::TargetRegistry::lookupTarget(mod.getTargetTriple(), false, false, Err);
|
||||
if (theTarget == 0)
|
||||
{
|
||||
error("failed to auto-select target: %s, please use the -march option", Err.c_str());
|
||||
|
||||
Reference in New Issue
Block a user