【发布时间】:2010-02-02 10:50:14
【问题描述】:
我需要将 -Wl,-rpath,\$$ORIGIN/lib/ 传递给 g++ 的链接器 (reason)。有没有办法在 Jamroot 文件中传递这个参数?
【问题讨论】:
标签: linux boost boost-python boost-build bjam
我需要将 -Wl,-rpath,\$$ORIGIN/lib/ 传递给 g++ 的链接器 (reason)。有没有办法在 Jamroot 文件中传递这个参数?
【问题讨论】:
标签: linux boost boost-python boost-build bjam
Ivan Vucica already described how to do it by modifying the toolset。另一种选择是将其添加到项目的属性中。在 Jamroot 的顶部,添加以下规则(或修改预先存在的 project 规则)。
project
: requirements
<toolset>gcc:<linkflags>"-Wl,-rpath,\\$ORIGIN/lib"
;
这只会影响这个项目上的 gcc,即使当前的 using gcc ; 命令是从 Jamroot 外部调用的(就像在 Ubuntu 的默认配置中一样)。
在调用 python-extension 时以某种方式修改 Boost.Build 链接的 python-for-extensions 别名可能会有更好的方法,但我不知道该怎么做,或者即使可以做到。
【讨论】:
【讨论】: