[cfe-dev] libc++ on Windows (Rationale)

Fernando Pelliccioni fpelliccioni at gmail.com
Tue Aug 24 09:02:06 PDT 2010


On Tue, Aug 24, 2010 at 11:57 AM, Howard Hinnant <hhinnant at apple.com> wrote:

> On Aug 24, 2010, at 8:03 AM, Fernando Pelliccioni wrote:
>
> > Hi,
> >
> > I am trying to compile LibC++ on WinXP (32) using MinGW (GCC 4.6).
> >
> > I've seen some extensions are used, as the "xlocale.h", which makes it
> difficult to compile in Windows using MinGW. No way to use MSVC.
> >
> > I wonder..., What is the goal of the creators of Clang and LibC++ in
> terms of portability? Is there any reason why Windows should not be
> supported? Or just a matter of time, is started by the Unix-Like operating
> systems?
> >
> > I would like to contribute to the project, to make Clang and LibC++, in
> the future, the default compiler C++ for almost any platform.
>
> I can speak for libc++:  libc++ is meant to be a high quality open source
> C++ standard library.  The initial implementation has been targeted straight
> at Apple's platforms, with the notion that it should take advantage of the
> underlying OS when available and where appropriate (e.g. <xlocale.h>).  One
> of the reasons for open sourcing this code however is so that others are
> free to port libc++ to other platforms where they can take advantage of
> other OS's features.
>
> Porting <locale> is going to require significant effort and knowledge of
> the target OS, unless it is acceptable to the porters to support only a
> minimum "C" locale.  Such minimal support was not acceptable to me for the
> Apple platforms.
>
> At no time has it been envisioned that every line of code in libc++ shall
> be portable.  Instead it is envisioned that libc++ will have to be adapted
> to different OS's to make the most out of each OS.  The goal of any C++
> standard library should be to (when necessary) consist of non-portable code
> so that its clients don't have to write non-portable code.  Naturally
> though, libc++ code should not be gratuitously non-portable.
>
> -Howard
>
>
Thanks Howard,

You said that libc++ is open for others to implement it on other platforms.
Did you mean that these other implementations should be separated from
libc++?.
Or these implementations can be included in the libc++ code? (A single
library with conditional compilation according to platform).

I offer my time to try to make libc++ cross-platform.

Regards,
Fernando.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100824/36240f60/attachment.html>


More information about the cfe-dev mailing list