Fixed choosing default target machine without needing to link in targets.

This commit is contained in:
Tomas Lindquist Olsen 2008-09-07 17:44:25 -07:00
parent 88f9ca75ad
commit f411df11e3
3 changed files with 13 additions and 30 deletions

View file

@ -1483,23 +1483,6 @@ LLConstant* DtoTypeInfoOf(Type* type, bool base)
//////////////////////////////////////////////////////////////////////////////////////////
void findDefaultTarget()
{
std::string err_str;
const llvm::TargetMachineRegistry::entry* e = llvm::TargetMachineRegistry::getClosestTargetForJIT(err_str);
if (e == 0)
{
error("Failed to find a default target machine: %s", err_str.c_str());
fatal();
}
else
{
global.params.llvmArch = const_cast<char*>(e->Name);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
LLValue* DtoBoolean(Loc& loc, DValue* dval)
{
Type* dtype = dval->getType()->toBasetype();