[cfe-dev] [PATCH] Libc++ Windows fixes

Howard Hinnant hhinnant at apple.com
Mon Oct 17 13:07:53 PDT 2011


On Oct 16, 2011, at 4:34 PM, Ruben Van Boxem wrote:

> 2011/10/16 Aaron Ballman <aaron at aaronballman.com>
> On Sun, Oct 16, 2011 at 2:26 PM, Ruben Van Boxem
> <vanboxem.ruben at gmail.com> wrote:
> > Fresh patch attached.
> >
> > --- include/__config  (revision 141003)
> > +++ include/__config  (working copy)
> >
> > @@ -69,17 +71,45 @@
> >  # endif
> >  #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
> >
> > -#ifndef _LIBCPP_VISIBILITY_TAG
> > -#define _LIBCPP_VISIBILITY_TAG 1
> > +#if _WIN32
> > +
> > +// only really useful for a DLL
> > +#ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally...
> > +# ifdef cxx_EXPORTS
> > +#  define _LIBCPP_HIDDEN
> > +#  define _LIBCPP_VISIBLE __cdecl(dllexport)
> > +# else
> > +#  define _LIBCPP_HIDDEN
> > +#  define _LIBCPP_VISIBLE __cdecl(dllimport)
> > +# endif
> > +#else
> > +# define _LIBCPP_HIDDEN
> > +# define _LIBCPP_VISIBLE
> >  #endif
> 
> I hadn't noticed this previously, but I'm unfamiliar with being able
> to use the calling convention in place of __declspec.  Is that
> documented somewhere on MSDN?
> 
> Wow, crap. those two are just too similar. My mistake. Compiler didn't complain though. Probably does not do what it should... Fixed patch attached. I'll blame it on the fact that today is sunday :/
> 
> Ruben
> 
> Everything else looks great!  Thanks!
> 
> ~Aaron
> 
> <msvc.patch.txt>

Committed revision 142235.

I modified the alignas support a little bit.  If I messed it up, let me know.

Thanks!
Howard




More information about the cfe-dev mailing list