[llvm] r207349 - MC: restore behaviour of defaulting to ELF

Saleem Abdulrasool compnerd at compnerd.org
Sun Apr 27 08:47:14 PDT 2014


On Sunday, April 27, 2014, Rafael EspĂ­ndola <rafael.espindola at gmail.com>
wrote:

> Why? There was a bot failure? Was the original change discussed
> somewhere? If this revert is not a temporary thing, could you add a
> test showing that we default to ELF?


Yeah, the Hexagon and MIPS buildbots broke since the tests aren't specific
in their run lines.  I think that this should be addressed as a proper fix
rather than adding a test case and perpetuating this behaviour.  I don't
expect that LLVM will target everything, but that doesn't justify
emitting something arbitrary in that case.  As an example: mips-win32
currently generates a MIPS ELF object file.


> On 27 April 2014 00:54, Saleem Abdulrasool <compnerd at compnerd.org<javascript:;>>
> wrote:
> > Author: compnerd
> > Date: Sat Apr 26 23:54:16 2014
> > New Revision: 207349
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=207349&view=rev
> > Log:
> > MC: restore behaviour of defaulting to ELF
> >
> > This restores the previous behaviour of just assuming that if you dont
> specify a
> > valid triple that you really meant the default triple with an ELF object
> file.
> >
> > Modified:
> >     llvm/trunk/lib/MC/MCObjectFileInfo.cpp
> >
> > Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=207349&r1=207348&r2=207349&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
> > +++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Sat Apr 26 23:54:16 2014
> > @@ -780,10 +780,9 @@ void MCObjectFileInfo::InitMCObjectFileI
> >        (T.isOSDarwin() || T.isOSBinFormatMachO())) {
> >      Env = IsMachO;
> >      InitMachOMCObjectFileInfo(T);
> > -  } else if (T.isOSWindows() && T.getObjectFormat() == Triple::COFF) {
> > -    assert((Arch == Triple::x86 || Arch == Triple::x86_64 ||
> > -            Arch == Triple::arm || Arch == Triple::thumb) &&
> > -           "unsupported Windows COFF architecture");
> > +  } else if ((Arch == Triple::x86 || Arch == Triple::x86_64 ||
> > +              Arch == Triple::arm || Arch == Triple::thumb) &&
> > +             (T.isOSWindows() && T.getObjectFormat() == Triple::COFF)) {
> >      Env = IsCOFF;
> >      InitCOFFMCObjectFileInfo(T);
> >    } else {
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu <javascript:;>
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>


-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140427/7a424f63/attachment.html>


More information about the llvm-commits mailing list