Boost logo

Boost :

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


On 9/3/2015 10:02 AM, Paul A. Bristow wrote:
> I've downloaded the shiny new Clang 3.7 and added this to my user-config. # 64-bit version
> using clang # from http://llvm.org/releases/download.html
> : # version
> 3.7.0
> : # Clang compiler .exe location
> #"C:/LLVM/bin/clang++.exe" # OK
> #"C:\\Program Files (x86)\\LLVM\\bin\\clang++.exe" # OK
> "C:\\Program Files\\LLVM\\bin\\clang++.exe" #
> : # options
> ;

Is this meant to be your user-config.jam entry for clang ? If so, it is
hard to follow.

This is my experience with clang built from source:

If you are running clang as a 64-bit compiler you need to "use" a 64-bit
version of mingw-64, and not mingw which is only 32-bits. By "use" I
mean one of two things. Either the 'bin' directory of the 64-bit version
should be prepended to your Windows PATH when invoking clang++ or you
use the '--sysroot=some_mingw' option on the command line when invoking
clang++, where 'some_mingw' is the path to the 64-bit mingw
implementation. I have not used the second method but have been told it
should work.

What I do, in a batch file before invoking clang++, is to prepend to the
Windows PATH the clang++ bin directory followed by the bin directory of
the mingw-64 implementation I want clang to use. Then when clang++ is
invoked it finds everything properly. If you are compiling clang++ for
32-bit code you need to "use" a 32-bit version of mingw(-64)/gcc and if
you are compiling clang++ for 64-bit code you need to "use" a 64-bit
version of mingw-64/gcc.

As far as pre-built versions of clang I have used clang 3.6.2, 3.5.2,
and clang 3.4.1. None of these versions could "use" mingw-64 but only
mingw. This means that none of these versions could be used to compile
64-bit code since mingw only supports 32-bit code. I have not tried the
new pre-build clang 3.7 yet, which supposedly is capable of using
mingw-64 ( I know the latest clang built from source can "use" mingw-64
but I am not sure if this capability got into the 3.7 release ).


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