Boost logo

Boost :

Subject: Re: [boost] Compiling with Clang 3.7.0 from windows
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-09-03 18:32:47


On 9/3/2015 3:19 PM, Ion Gaztañaga wrote:
> El 03/09/2015 a las 18:02, Paul A. Bristow escribió:
>
>>> ? Which MinGW are you using?
>>
>> Not the right one :-((
>>
>> Which one do LLVM folks recommend to use?
>
> I read something here:
>
> http://clang.llvm.org/docs/UsersManual.html#mingw-w64

Actually I was able to use the latest clang built from source with
mingw-64/gcc v5.1 32-bit and 64-bit. So the targeted mingw-64/gcc
versions in the link above is a bit out of date.

However for previous prebuilt versions, which understand only the mingw
and not the mingw-64 directory structures, I could only use mingw/gcc
4.6.n or below for clang 3.4.1, and mingw/gcc 4.8.n or below for clang
3.5.2 and clang 3.6.2.

>
> but hacks with newer versions here:
>
> https://yongweiwu.wordpress.com/2014/12/24/installing-clang-3-5-for-windows/

Whenever you run clang, or mingw/gcc, you need to manipulate the PATH so
that the correct version of mingw(-64)/gcc is at the beginning of the
PATH for a given particular run. There is no way to set a permanent PATH
so that running either clang or gcc will always work when you are using
different versions of mingw(-64)/gcc and/or different versions of clang
which target different versions of mingw(-64)/gcc. This is just a
reality of mingw/gcc and clang on Windows. The above link not initially
knowing this is what was at fault.

>
>
> It would be nice if we could discover some easy steps to run the
> official clang 3.7 binary on an official "mingw-build" or "mingw-w64"
> build and configure user-config.jam correctly.

It needs far more Boost build/bjam expertise for the clang-linux.jam
than I am able to provide. I know what would need to be done but I have
no idea how to do it within Boost build.

Essentially for any given clang release the Boost build toolset for
clang on Windows ( remember that clang-linux.jam supports both clang on
Linux and clang on Windows targeting gcc ) needs both the directory
where the clang version resides and the directory where the target
mingw(-64)/gcc version resides. These directories needed to be prepended
to the Windows PATH for all Boost build actions such as compile/link/run
etc.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk