[LLVMdev] Building lld with Visual Studio 2012 RC

Cesar Mello cmello at gmail.com
Sat Jun 16 20:23:18 PDT 2012


OK thanks a lot Michael Spencer!

After getting your latest commit now everything compiles on Visual Studio
2012 RC. I'm just playing around to learn.

Maybe this is the funniest place to start assessing my possibilities of
contributing to llvm in the free time:

Writer* createWriterPECOFF(const WriterOptionsPECOFF &options) {
  assert(0 && "PE/COFF support not implemented yet");
  return nullptr;
}

:-)

Best regards!
Mello


On Sat, Jun 16, 2012 at 10:22 PM, Michael Spencer <bigcheesegs at gmail.com>wrote:

> On Sat, Jun 16, 2012 at 4:15 PM, Cesar Mello <cmello at gmail.com> wrote:
> > Hi!
> >
> > I'm trying to build lld Microsoft Visual Studio 2012 RC, but it seems the
> > bzero function is not available.
> >
> > Could memset be used instead of bzero? Or maybe define a bzero for msvc
> > using memset.
> >
> > For example:
> >
> >       // in-memory matches on-disk, so copy first fields followed by path
> >       ::memcpy(to, (uint8_t*)&cmd, 12);
> >       ::memcpy(&to[12], _name.data(), _name.size());
> >       ::bzero(&to[12+_name.size()], cmdsize-(12+_name.size()));
> >
> > The bzero line could be changed to:
> >
> >  ::memset(&to[12+_name.size()], 0, cmdsize-(12+_name.size()));
> >
> > Thanks a lot for the attention and congratulations for the great work!!!
> >
> > Best regards
> > Mello
>
> While this will make it compile, the code is not valid to begin with.
> It is trying to do a raw memory copy of a non standard-layout type.
> nameoffset is not guaranteed to directly follow cmdsize.
>
> Fixing this will require quite a few changes, so for now I've
> committed your change.
>
> - Michael Spencer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120617/6039a9dd/attachment.html>


More information about the llvm-dev mailing list