Boost logo

Boost-Build :

Subject: Re: [Boost-build] Possibilities of clang for Windows
From: Vladimir Prus (ghost_at_[hidden])
Date: 2014-07-09 04:06:34


On 07/09/2014 12:01 AM, Edward Diener wrote:
> The clang for Windows executable can be created so that the target defaults to either vc++ or mingw/gcc mode. In Boost Build we currently
> have a single toolset called clang, which works on the MacOS and Linux. In order for it to work on Windows we can choose among these
> separate possibilities:
>
> 1) Create a separate toolset, called 'clang-cl', for clang on Windows targeting vc++.
>
> 2) Require the end-user using clang on Windows targeting vc++ to invoke the command:
> a) as 'clang-cl'
> b) as 'clang' with a 'compatibility' option ( 'vcnn' as in 'vc12' )
>
> 3) Require the end-user to specify a 'target' option, either 'i386-pc-win32' for vc++ mode or 'i386-pc-mingw32' for gcc/mingw mode.
>
> 4) Execute 'clang --version' piping the output back into stdin or writing the output to a file and reading the file back in, and parsing the
> information to automatically figure out which mode it is.

The last option is quite attractive. On the other hand, would a user ever need to use both flavours of clang at the same time? If so,
we're back to the question of how to identify them. I wonder whether the produced binaries are significantly different in these
cases - like, do they happen to have different C++ ABI?

> Thoughts ? Ideas ?
>
> Whatever Boost Build decides to do I probably need some help implementing the solution in bjam language. I have added to 'develop' the
> clang-win.jam file, but it currently never gets invoked because the change I have locally to invoke it in clang.jam precludes the mingw/gcc
> mode of clang for Windows. I also have a local change to common.jam which also precludes the possibility of mingw/gcc mode in Windows.
> Solving this problem of supporting both vc++ and mingw/gcc mode for clang under Windows is essential if we are going to support it in
> Windows as well as in the MacOS and Linux.

While my schedule is just as unpredictable as usual, I do have some extra interest in clang support these days, so hopefully we'll figure
things out.

Thanks,
Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk