首页 > 技术文章 > clang, boost

sunrisecape 2020-07-18 14:13 原文

window平台clang编译成功的参数:

-----------------------------------------------------------------------------------------------
b2 --build-dir=build --stagedir=lib-cc architecture=x86 address-model=64  link=static runtime-link=static runtime-link=static toolset=clang-win variant=release threading=single
--build-dir=build:编译目录
--stagedir=lib-cc:lib目录
architecture=x86 address-model=64:x86体系,64位
link=static runtime-link=static runtime-link=static: 静态,不使用dll
toolset=clang-win: 构建用clang-win
variant=release: 不是debug方式
threading=single: 去掉 -mt
--with-filesystem :只编译filesystem /  --build-type=complete stage : 编译全部
-----------------------------------------------------------------------------------------------
b2 stage --toolset=msvc-14.1 --without-graph --without-graph_parallel 
--stagedir="F:\boost_1_68_0\build\lib"
link=static runtime-link=static runtime-link=static threading=multi debug release

I have a problem building debug versions of the standard and runtime support libraries using clang-win toolset (with msvc toolset everything works as expected)

Specifically I'm trying to build mt-gd variant of the lib file so I add runtime-debugging=on switch as Boost docs say but to no avail
Here's what I get:

1) b2 toolset=msvc-14.1 address-model=64 --with-filesystem variant=release
generates libboost_filesystem-vc141-mt-x64-1_72.lib [correct]

2) b2 toolset=msvc-14.1 address-model=64 --with-filesystem runtime-debugging=on variant=debug
generates libboost_filesystem-vc141-mt-gd-x64-1_72.lib [correct]

3) b2 toolset=clang-win address-model=64 --with-filesystem variant=release
generates libboost_filesystem-clangw9-mt-x64-1_72.lib [correct]

4) b2 toolset=clang-win address-model=64 --with-filesystem runtime-debugging=on variant=debug
generates libboost_filesystem-clangw9-mt-d-x64-1_72.lib [incorrect]
Should be libboost_filesystem-clangw9-mt-gd-x64-1_72.lib

Same behavior for boost 1.67, boost 1.68 and boost 1.71
Anybody have an idea what's wrong?


推荐阅读