Support for generating ELF objects on Windows.

This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present.  This patch also enables MCJIT tests on Windows using the new environment value.

llvm-svn: 165030
This commit is contained in:
Andrew Kaylor
2012-10-02 18:38:34 +00:00
parent 5e5cf1a50c
commit feb805fcf2
57 changed files with 84 additions and 59 deletions

View File

@@ -26,7 +26,14 @@
using namespace llvm;
TargetMachine *EngineBuilder::selectTarget() {
Triple TT(LLVM_HOSTTRIPLE);
Triple TT;
// MCJIT can generate code for remote targets, but the old JIT and Interpreter
// must use the host architecture.
if (UseMCJIT && WhichEngine != EngineKind::Interpreter && M)
TT.setTriple(M->getTargetTriple());
else
TT.setTriple(LLVM_HOSTTRIPLE);
return selectTarget(TT, MArch, MCPU, MAttrs);
}