Boost logo

Boost :

Subject: Re: [boost] How to build boost on windows with Clang/LLVM
From: Mikhail Strelnikov (mikhail.strelnikov_at_[hidden])
Date: 2017-10-15 15:01:25

I do use clang on Windows with bjam and it works (until it doesn't).

This 'C:/Program' looks like problem patched by this commit -
So you might need to use develop BB.

Here is my site-config.jam (you probably won't need all the stuff):

using clang
    : "C:/Program Files/LLVM/bin/clang.exe"
    : #<compileflags>-fmsc-version=1910
      <ranlib>"C:/Program Files/LLVM/bin/llvm-ranlib.exe"
      <archiver>"C:/Program Files/LLVM/bin/llvm-ar.exe"
      <rc>"C:/Program Files (x86)/Windows Kits/10/bin/10.0.15063.0/x64/rc.exe"

      <cxxflags>-Xclang <cxxflags>-flto-visibility-public-std

      <cxxflags>-Wno-dynamic-exception-spec # TODO: file bug to MS
      <cxxflags>-Wno-c++11-narrowing # TODO: wut




      <cxxflags>-D_CRT_DECLARE_NONSTDC_NAMES=1 # clang defines
__STDC__, cl does not (see definition of _CRT_INTERNAL_NONSTDC_NAMES)


It only works for x64 debug, so invocation is:

b2.exe -sBOOST_ROOT=B:\boost\ --build-dir=O:\out --disable-icu -j16
link=static runtime-link=static address-model=64 toolset=clang

Rene told us he is going to do things for clang on Windows, so there
is always hope.

2017-10-15 15:12 GMT+03:00 degski via Boost <boost_at_[hidden]>:
> On 15 October 2017 at 12:32, degski <degski_at_[hidden]> wrote:
>> ... so I am gonna give that a try and get back how it went.
> Ok, tried that, (I think as before), this is the first clue something is
> wong (with quotes, obviously):
> C:\boost_1_65_1>bjam -d0 --clean
> 'C:/Program' is not recognized as an internal or external command,
> operable program or batch file.
> So obviously a f'in 'quotes'-problem.
> This then later causes the same problem with <ranlib>"C:/Program
> Files/LLVM/bin/llvm-ranlib.exe" <archiver>"C:/Program
> Files/LLVM/bin/llvm-ar.exe". I see in boost-build (the folder I'm building
> in) that source files get compiled to *.obj (they exist), but they do not
> get assembled into a lib, because the tool-chain's exe's can't be found,
> due to missing quotes (that are there), wtf?
> ========config-project.jam=======================
> import option ;
> using clang : 6.0 :
> "C:/Program Files/LLVM/bin/clang++.exe" :
> <compileflags>-fmsc-version=1911
> <compileflags>-DBOOST_USE_WINAPI_VERSION=0x1000
> <compileflags>-DBOOST_USE_WINDOWS_H=1
> <compileflags>-D_WIN32_WINNT=0x1000
> <compileflags>-DNOMINMAX
> <ranlib>"C:/Program Files/LLVM/bin/llvm-ranlib.exe"
> <archiver>"C:/Program Files/LLVM/bin/llvm-ar.exe"
> <linkflags>-fuse-ld=lld
> <linkflags>-flto=thin
> ;
> option.set keep-going : false ;
> ===========================================
> It's an ansi codepage 850 txt file, just in case (I checked).
> The quotes *are* there [in the file] of course, so I don't get it...
> degski
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at