> -----Original Message-----
> From: Boost [mailto:[hidden email]] On Behalf Of Peter Dimov via Boost
> Sent: 09 July 2018 11:42
> To: boost-devel
> Cc: Peter Dimov
> Subject: [boost] toolset=clang-win uses clang-linux-win?
> When I try `b2 toolset=clang-win` on Appveyor, I get `clang-linux-win`
> instead, that is, `-win` is interpreted as version for some reason, not as
> https://ci.appveyor.com/project/pdimov/system/build/job/sjpdq5yrir2ewuhh >
> Is this normal, or is it a bug in the clang toolset? Is there a magic
> command line incantation that would let me select clang-win?
FWIW, my failed attempts to use b2 to generate Boost libraries, in the 'standard' way, announce:
clang version 6.0.0 (tags/RELEASE_600/final)
#https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-s # options are -flto, -flto=full, -flto=thin, -emit-llvm
# Generate output files in LLVM formats, suitable for link time optimization.
# The default for -flto is "full", in which the LLVM bitcode is suitable for monolithic Link Time Optimization (LTO),
# where the linker merges all such modules into a single combined module for optimization. With "thin",
# ThinLTO compilation is invoked instead.
# Need to stop reporting an error in Boost.System (needs fixing).
<linkflags>-fuse-ld=lld # Essential to use lld.
<linkflags>-flto=full # -flto=thin fails using Codeblocks "error: Expected a single module" But not later????
# -lmsvcrt Needed to avoid unresolved external symbol __imp____RTDynamicCast
# but also then need <toolset>clang:<define>NODEFAULTLIB=libcmt.lib # Avoid warning.
Paul A. Bristow
Kendal UK LA8 8AB
+44 (0) 1539 561830
> FWIW, my failed attempts to use b2 to generate Boost libraries, in the
> 'standard' way, announce:
> clang version 6.0.0 (tags/RELEASE_600/final)
> Is the "clang-linux" significant?
It is. The compiler itself will work, but attempts to build a library,
either static or shared, fail, as in
> On 9 July 2018 at 15:35, Peter Dimov via Boost <[hidden email]>
> > because the clang-linux toolset tries to use `ar` and `ranlib` for
> > static libraries, and passes ld-style options to link.exe for DLLs.
> That's no problem, you have to pass "clang-cl -fuse-ld=lld -flto=thin
> <rest of options>", ...
Using lld will work for shared but static libraries will still fail.
On 9 July 2018 at 15:51, Peter Dimov via Boost <[hidden email]>
> Using lld will work for shared but static libraries will still fail.
When I still had it working, it built statics (I only build statics), but
the whole lot will have to be compiled the same way, with " -fuse-ld=lld
-flto=thin". This is the reason I am pursuing this [building Boost with
Clang], since vcpkg has reduced the whole exercise of building Boost
(static/dynamic) on windows/vs to drinking lots of coffee, after passing
".\vcpkg install boost".
*"If something cannot go on forever, it will stop" - Herbert Stein*