From feb805fcf22b9568f32d6bee6d837ab417b89c18 Mon Sep 17 00:00:00 2001 From: Andrew Kaylor Date: Tue, 2 Oct 2012 18:38:34 +0000 Subject: 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 --- llvm/lib/MC/MCObjectFileInfo.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp') diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 8053624831b..c59477f6dd5 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -565,6 +565,7 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm, Env = IsMachO; InitMachOMCObjectFileInfo(T); } else if ((Arch == Triple::x86 || Arch == Triple::x86_64) && + (T.getEnvironment() != Triple::ELF) && (T.getOS() == Triple::MinGW32 || T.getOS() == Triple::Cygwin || T.getOS() == Triple::Win32)) { Env = IsCOFF; -- cgit v1.2.3