Subject: [Boost-build] How to make clang toolset use custom archiver and ranlib from user-config.jam?
From: FrÃ©dÃ©ric Bron (frederic.bron_at_[hidden])
Date: 2017-03-22 13:05:37
ar and ranlib cannot be customized for clang toolset as they are for
gcc which makes it difficult to use in a cross-compilation
environment. When cross-compiling from linux to windows, I can have in
using gcc : : i686-w64-mingw32-g++-6.3.0 :
<archiver>i686-w64-mingw32-ar <ranlib>i686-w64-mingw32-ranlib ;
With the clang toolset, this does not work, archiver and ranlib
options are ignored.
This is why: here is what we find in tools/build/src/tools/clang-darwin.jam
# Default value. Mostly for the sake of clang-linux
# that inherits from gcc, but does not has the same
# logic to set the .AR variable. We can put the same
# logic in clang-linux, but that's hardly worth the trouble
# as on Linux, 'ar' is always available.
.AR = ar ;
actions piecemeal archive
"$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
"ranlib" -cs "$(<)"
Unfortunately, I do not understand the language of jam files so the
only thing I can do for the time being is to manually edit the file
and replace ar and ranlib by their cross-compiler counterparts but I
am not able to change it so that the archiver and ranlib option can be
Could somebody do that or give hints on how I shoud do it?
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