|
Boost : |
Subject: Re: [boost] Clang on Windows
From: John Maddock (jz.maddock_at_[hidden])
Date: 2018-03-10 08:40:33
Plus I still see:
In file included from C:\Program
Files\LLVM\lib\clang\6.0.0\include\vadefs.h:32:
M:\Compilers\VC2017\VC\Tools\MSVC\14.13.26128\include\vadefs.h:112:10:
error: expected unqualified-id
   void __cdecl __va_start(va_list* , ...);
vadefs.h gets pulled in by limits.h BTW so this is hardly obscure stuff....
John.
On 09/03/2018 21:13, Edward Diener via Boost wrote:
> On 3/9/2018 3:02 PM, John Maddock via Boost wrote:
>>
>>>   The clang-win toolset is known to be broken. I don't
>>> know if it ever worked. I believe that clang-linux
>>> (using regular clang, not clang-cl) works for most
>>> platforms other than OSX. (Yes, I know, cleaning up
>>> this mess is on my todo list.)
>>
>> Using:
>>
>> using clang : : "C:/Program Files/LLVM/bin/clang-cl.exe" :
>> <compatibility>vc14.1 ;
>
> My use of clang-cl with clang-5.0 for x32 compilation looks like:
>
> using clang : 5.0cl : C:/Utilities/LLVM/500/x32/bin/clang++
> Â :
> Â <cxxflags>-fmacro-backtrace-limit=0
> Â <cxxflags>-Wno-invalid-token-paste
> Â <compileflags>-fmsc-version=1900
> Â <compileflags>--target=i686-pc-windows-msvc
> Â <linkflags>--target=i686-pc-windows-msvc
> Â <linkflags>-fuse-ld=lld
> Â ;
>
> It works for me pretty well when invoked as toolset=clang-5.0cl on the
> b2 command line. Before invoking b2 I am also doing:
>
> call "C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\VC\vcvarsall.bat" x86
>
> in order to setup vc++.
>
> For x64 compilation it looks like:
>
> using clang : 5.0x64cl : C:/Utilities/LLVM/500/x64/bin/clang++
> Â :
> Â <cxxflags>-fmacro-backtrace-limit=0
> Â <cxxflags>-Wno-invalid-token-paste
> Â <compileflags>-fmsc-version=1900
> Â <compileflags>--target=x86_64-pc-windows-msvc
> Â <linkflags>--target=x86_64-pc-windows-msvc
> Â <linkflags>-fuse-ld=lld
> Â ;
>
> invoked on the b2 command line as toolset=clang-5.0x64cl. Before
> invoking b2 I am also doing:
>
> call "C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\VC\vcvarsall.bat" amd64
>
> in order to setup vc++.
>
> Needless to say I have other using statements for clang with gcc for
> various C++ standard levels in the same user-config.jam.
>
> I am pretty sure to use the same type of setup with the recently
> released 6.0 on Windows.
>
> Maybe these will help you.
>
>>
>> Results in:
>>
>> $ ../../../b2 config_info clang
>> C:\cygwin64\home\John\user-config.jam:47: Unescaped special character
>> in argument <cxxflags>-std:c++latest
>> ..\..\..\libs\log\build\Jamfile.v2:45: Unescaped special character in
>> argument <define>$(flag)=1
>> M:/data/boost/boost/tools/build/src/build\configure.jam:288: in
>> try-find-build
>> *** argument error
>> * rule log-check-result ( result )
>> * called with: (Â )
>> * missing argument result
>> M:/data/boost/boost/tools/build/src/build\configure.jam:86:see
>> definition of rule 'log-check-result' being called
>> M:/data/boost/boost/tools/build/src/build\configure.jam:391: in
>> find-builds-raw
>> M:/data/boost/boost/tools/build/src/build\configure.jam:450: in
>> configure.find-builds
>> M:/data/boost/boost\boostcpp.jam:734: in boostcpp.deduce-address-model
>> M:/data/boost/boost/tools/build/src/kernel\modules.jam:107: in
>> modules.call-in
>> M:/data/boost/boost/tools/build/src/util\indirect.jam:105: in
>> indirect.call
>> M:/data/boost/boost/tools/build/src/build\property.jam:144: in
>> property.evaluate-conditionals-in-context
>> M:/data/boost/boost/tools/build/src/build\targets.jam:1087: in
>> evaluate-requirements
>> M:/data/boost/boost/tools/build/src/build\targets.jam:1121: in
>> common-properties2
>> M:/data/boost/boost/tools/build/src/build\targets.jam:1017: in
>> targets.common-properties
>> M:/data/boost/boost/tools/build/src/build\targets.jam:1313: in
>> class_at_basic-target.generate
>> M:/data/boost/boost/tools/build/src/build\targets.jam:812: in
>> generate-really
>> M:/data/boost/boost/tools/build/src/build\targets.jam:784: in
>> class_at_main-target.generate
>> M:/data/boost/boost/tools/build/src\build-system.jam:797: in load
>> M:\data\boost\boost\tools\build\src/kernel\modules.jam:295: in import
>> M:\data\boost\boost\tools\build\src/kernel/bootstrap.jam:139: in
>> boost-build
>> M:\data\boost\boost\boost-build.jam:17: in module scope
>>
>> Using:
>>
>> using clang : : "C:/Program Files/LLVM/bin/clang.exe" ;
>>
>> Does indeed seem to work OK, and as far as I can tell it's clang on
>> top of msvc-14.1.
>>
>>> Â Â They're harmless for now, but will break
>>> at some unspecified time in the future, when
>>> I switch to the new lexer.
>>
>> It would help a lot if the message said which characters were special
>> and need escaping.
>>
>> Thanks, John.
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
--- This email has been checked for viruses by AVG. http://www.avg.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk