Subject: Re: [Boost-build] Clang windows toolset
From: tr1gun (tr1gun_at_[hidden])
Date: 2013-10-24 16:29:47
On 24.10.2013 19:23, Edward Diener wrote:
> On 10/23/2013 4:54 PM, tr1gun wrote:
>> attached you find a patch to add the clang toolset for windows.
>> clang_win.patch : adds the clang win toolset and passes the Z7 flag to
>> the compiler. I think this version should be applied as clang developers
>> strive to be compatible with msvc. To workaround the Z7 bug someone can
>> pass at the command line: debug-store=database
>> clang_win_ignore_z7.patch : Only filters the debug-store<object> / Z7
>> command line. Probably not needed.
>> common_clang_win.patch : add the clang-win name for mangling. I also
>> included the visual studio version. I think it should not be left out
>> like with the intel compiler. In the end it generates the toolset name
>> with e.g. clang 3.4 and visual stuadio 2010: clang-win3_4_vc10
>> There are two options to setup the toolset in user-confing.jam:
>> 1. if clang-cl is found in path:
>> using clang : 3.4 : : <compatibility>vc10
>> 2. Full command line for clang-cl:
>> using clang : 3.4 : C:\MyInstallationPath\clang-cl.exe :
>> <compatibility>vc10 ;
>> Hope this helps to test boost with the clang toolset.
>> At the moment it relies on the VS*COMNTOOLS variable to look up the
>> vcvarsall.bat file. I haven't figured out how to extract the path from
>> the msvc.jam file. Perhaps someone else can help with it.
>> Also the auto-link header need to be changed. I can provide a patch for
>> it when it is clear how the boost libs will be named. This depends if
>> the visual studio version is included or not in the library name.
> My test with your clang_win.patch and common_clang_win.patch shows a
> "clang-cl.exe: error: no such file or directory: '/Z7'"
> Am I supposed to use the clang_win_ignore_z7.patch instead of the
> clang_win.patch ?
You can use clang_win_ignore_z7.patch. Clang should probably fix the
parsing code to ignore or handle the Z7 flag.
About the defines/options i can add them to toolset initialization.
At the moment it is probably easier to add them to user-config to get
started. About the compatibility flag you can pass vc10, vc11, vc12. It
adds the -fmsc-version command line parameter, as command line help
suggested it would not set _MSC_VER otherwise.
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