From 242548906d0669984661f993373606e98c581cf2 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 18 Mar 2015 22:19:16 +0000 Subject: Teach getDefaultFormat that we only support ELF on some architectures. This should bring the windows bots back. It is a bit ugly, but it is better than what we had before: The triple would say that the object format was COFF, but llc/llvm-mc would produce an ELF. llvm-svn: 232683 --- llvm/lib/Support/Triple.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'llvm/lib/Support') diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index d74173a6621..4b4ee283e64 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -439,6 +439,23 @@ static const char *getObjectFormatTypeName(Triple::ObjectFormatType Kind) { } static Triple::ObjectFormatType getDefaultFormat(const Triple &T) { + switch (T.getArch()) { + default: + break; + case Triple::hexagon: + case Triple::mips: + case Triple::mipsel: + case Triple::mips64: + case Triple::mips64el: + case Triple::r600: + case Triple::amdgcn: + case Triple::sparc: + case Triple::sparcv9: + case Triple::systemz: + case Triple::xcore: + return Triple::ELF; + } + if (T.isOSDarwin()) return Triple::MachO; else if (T.isOSWindows()) -- cgit v1.2.3