mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 01:23:14 +01:00
Restored old behavior of initialization of llvm targets.
LDC initializes only a llvm host target and targets that were explicitly requested when building the program.
This commit is contained in:
18
gen/main.cpp
18
gen/main.cpp
@@ -449,11 +449,19 @@ int main(int argc, char** argv)
|
||||
// Allocate target machine.
|
||||
|
||||
// first initialize llvm
|
||||
llvm::InitializeAllTargetInfos();
|
||||
llvm::InitializeAllTargets();
|
||||
llvm::InitializeAllAsmPrinters();
|
||||
llvm::InitializeAllAsmParsers();
|
||||
llvm::InitializeAllTargetMCs();
|
||||
#if 0
|
||||
llvm::InitializeNativeTarget();
|
||||
llvm::InitializeNativeTargetAsmParser();
|
||||
llvm::InitializeNativeTargetAsmPrinter();
|
||||
#endif
|
||||
#define LLVM_TARGET(A) \
|
||||
LLVMInitialize##A##TargetInfo(); \
|
||||
LLVMInitialize##A##Target(); \
|
||||
LLVMInitialize##A##AsmPrinter(); \
|
||||
LLVMInitialize##A##AsmParser(); \
|
||||
LLVMInitialize##A##TargetMC();
|
||||
LDC_TARGETS
|
||||
#undef LLVM_TARGET
|
||||
|
||||
const llvm::Target *theTarget = NULL;
|
||||
// Check whether the user has explicitly specified an architecture to compile for.
|
||||
|
||||
Reference in New Issue
Block a user