|
Boost : |
Subject: Re: [boost] [clang] Windows toolset support?
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-10-29 05:33:34
> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Joshua
Boyce
> Sent: Saturday, October 27, 2012 3:42 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] [clang] Windows toolset support?
>
> On Tue, Oct 23, 2012 at 6:25 AM, Beman Dawes <bdawes_at_[hidden]> wrote:
>
> > Cygwin has been shipping clang for six months or so. Has anyone gotten
> > the cygwin/clang distribution (or any other clang distribution) to
> > build boost?
> >
> > What toolset did you use?
> >
> > What does your user-config.jam file look like?
> >
> > Do you run bjam/b2 from the Windows command line or the bash command line?
> I do not use cygwin, however I have successfully been building and using Boost with Clang on
Windows
> using the toolchain provided by rubenvb over at the Mingw-w64 project:
> http://sourceforge.net/projects/mingw-
> w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/clang-3.1-release/
>
> My user-config.jam is empty.
>
> I compile with the following command line (windows command line):
>
> > set OLDCD=%CD%
> > pushd %BOOST_ROOT%
> > set OLDPATH=%PATH%
> > set PATH=%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;%PATH%
> > b2 -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11
> > address-model=32 architecture=x86 --stagedir=stage/clang-x86
> > link=static runtime-link=static threading=multi debug-symbols=on
> > define=WINVER=_WIN32_WINNT_VISTA
> > define=_WIN32_WINNT=_WIN32_WINNT_VISTA
> > stage > %OLDCD%\clang32.txt
> > set PATH=%OLDPATH%
> > popd
>
>
> Unfortunately Boost is detecting the compiler as "clang.linux", but other than that it seems to
work for the
> most part.
>
> The stuff that doesn't work:
> * Boost.Context (it fails to assemble its assembler files)
> * Boost.Math (it attempts an 'rm' command, I assume because it thinks it's on *nix)
> * Boost.Python (the same ::hypot error that also plagues GCC in C++11 mode)
>
> Most everything else seems to work okay (though I have to use pragmas to disable a LOT of warnings
> when including boost headers, though that may simply be because I have all warnings enabled).
>
> Clang support on Windows still needs a lot of work (Ruben tells me that there's about half a
person
> working on it on the Clang side), but perhaps some interest from the Boost community would help
drive
> some more investment into the platform?
This sounds rather promising.
Having got Ruben's mingw gcc binary to work nicely with NetBeans, I tried to use Ruben's Clang
binary, but I haven't got this configured right yet. Since NetBeans provides a nice IDE on
Windows, I'm sure there will be lots of enthusiasm from Boosters to be able to use this compiler.
Paul
--- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk