Subject: Re: [boost] clang-win, (Thin)LTO this time
From: Peter Dimov (lists_at_[hidden])
Date: 2018-11-07 14:00:25
> > So, -fuse-ld=lld is quoted in the command. It appears [looks like]
> > clang-cl.exe gobbles the quotes, though, i.e. it seems to work.
> A simple test [slow brain I guess, alzheimers' kicking in] confirms the
The first level of quoting is b2 quoting:
using clang-win : : "C:\\Program Files\\LLVM\\clang-cl.exe" ;
Here the quotes and the backslashes are b2 quoting; the value itself ends up
'C:\Program Files\LLVM\clang-cl.exe' (without the single quotes of course.)
If you don't quote, as in
using clang-win : : C:/Program Files/LLVM/clang-cl.exe ;
b2 will split this on the space character and the value will be a list of
`C:/Program` and `Files/LLVM/clang-cl.exe`.
using clang-win : : "C:\\Program Files\\LLVM\\clang-cl.exe" -fuse-ld=lld
the result is a list of `C:\Program Files\LLVM\clang-cl.exe` and
The second level of quoting, which clang-win.jam applies to the above list
compiler = "\"$(compiler)\"" ;
is for the Windows command line. The result is a command line of the form
"C:\Program Files\LLVM\clang-cl.exe" "-fuse-ld=lld" <args>
It's not clang-cl.exe that strips the quotes here, it's cmd.exe. Without the
quotes, it will give an error that `C:\Program` isn't found.
The quotes around `-fuse-ld=lld` are unnecessary in this case, as this
argument has no spaces, but they don't hurt. They would be needed for
something like (hypothetically) "-fsome-path=C:\Program Files\somepath".
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk