forked from premiere/premiere-libtorrent
use -fvisibility=hidden for darwin and gcc toolkits
This commit is contained in:
parent
4bd0d2d2e6
commit
3d34d30afb
24
Jamfile
24
Jamfile
|
@ -109,23 +109,30 @@ rule linking ( properties * )
|
||||||
if <boost>source in $(properties)
|
if <boost>source in $(properties)
|
||||||
{
|
{
|
||||||
if <boost-link>static in $(properties)
|
if <boost-link>static in $(properties)
|
||||||
|
{
|
||||||
|
if <toolset>darwin in $(properties) || <toolset>gcc in $(properties)
|
||||||
|
{
|
||||||
|
result += <library>/boost/thread//boost_thread/<link>static/<cflags>-fvisibility=hidden
|
||||||
|
<library>/boost/filesystem//boost_filesystem/<link>static/<cflags>-fvisibility=hidden
|
||||||
|
<library>/boost/system//boost_system/<link>static
|
||||||
|
#/<cflags>-fvisibility=hidden
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
result += <library>/boost/thread//boost_thread/<link>static
|
result += <library>/boost/thread//boost_thread/<link>static
|
||||||
<library>/boost/filesystem//boost_filesystem/<link>static
|
<library>/boost/filesystem//boost_filesystem/<link>static
|
||||||
<library>/boost/system//boost_system/<link>static
|
<library>/boost/system//boost_system/<link>static
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
<define>BOOST_ALL_NO_LIB
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result += <library>/boost/thread//boost_thread/<link>shared
|
result += <library>/boost/thread//boost_thread/<link>shared
|
||||||
<library>/boost/filesystem//boost_filesystem/<link>shared
|
<library>/boost/filesystem//boost_filesystem/<link>shared
|
||||||
<library>/boost/system//boost_system/<link>shared
|
<library>/boost/system//boost_system/<link>shared ;
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
<define>BOOST_ALL_NO_LIB
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
result += <include>$(BOOST_ROOT) <define>BOOST_ALL_NO_LIB ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if <boost>system in $(properties)
|
if <boost>system in $(properties)
|
||||||
|
@ -146,6 +153,11 @@ rule building ( properties * )
|
||||||
{
|
{
|
||||||
local result ;
|
local result ;
|
||||||
|
|
||||||
|
if <toolset>gcc in $(properties) || <toolset>darwin in $(properties)
|
||||||
|
{
|
||||||
|
result += <cflags>-fvisibility=hidden ;
|
||||||
|
}
|
||||||
|
|
||||||
if ( <target-os>linux in $(properties)
|
if ( <target-os>linux in $(properties)
|
||||||
|| <target-os>darwin in $(properties) )
|
|| <target-os>darwin in $(properties) )
|
||||||
&& ( <toolset>gcc in $(properties)
|
&& ( <toolset>gcc in $(properties)
|
||||||
|
|
|
@ -2,7 +2,7 @@ import python ;
|
||||||
|
|
||||||
use-project /torrent : ../.. ;
|
use-project /torrent : ../.. ;
|
||||||
|
|
||||||
lib boost_python : : <name>boost_python $(library-search-path) ;
|
lib boost_python : : <name>boost_python-mt $(library-search-path) ;
|
||||||
|
|
||||||
rule libtorrent_linking ( properties * )
|
rule libtorrent_linking ( properties * )
|
||||||
{
|
{
|
||||||
|
@ -10,13 +10,28 @@ rule libtorrent_linking ( properties * )
|
||||||
|
|
||||||
if <toolset>gcc in $(properties)
|
if <toolset>gcc in $(properties)
|
||||||
{
|
{
|
||||||
result += <library>/torrent//torrent/<link>static/<cxxflags>-fPIC/<cflags>-fPIC <cxxflags>-fPIC ;
|
result += <library>/torrent//torrent/<link>static/<cflags>-fPIC
|
||||||
|
<cflags>-fPIC ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result += <library>/torrent//torrent/<link>static ;
|
result += <library>/torrent//torrent/<link>static ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if <toolset>gcc in $(properties) || <toolset>darwin in $(properties)
|
||||||
|
{
|
||||||
|
result += <cflags>-fvisibility=hidden ;
|
||||||
|
|
||||||
|
if <boost>source in $(properties) && <boost-link>static in $(properties)
|
||||||
|
{
|
||||||
|
result += <library>/boost/python//boost_python/<link>static/<cflags>-fvisibility=hidden ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if <boost>source in $(properties) && <boost-link>static in $(properties)
|
||||||
|
{
|
||||||
|
result += <library>/boost/python//boost_python/<link>static ;
|
||||||
|
}
|
||||||
|
|
||||||
# when building peer_plugin.cpp on msvc-7.1 it fails
|
# when building peer_plugin.cpp on msvc-7.1 it fails
|
||||||
# running out of internal heap space. Don't add it
|
# running out of internal heap space. Don't add it
|
||||||
# to windows build, since it's not critical anyway
|
# to windows build, since it's not critical anyway
|
||||||
|
@ -54,7 +69,6 @@ python-extension libtorrent
|
||||||
src/magnet_uri.cpp
|
src/magnet_uri.cpp
|
||||||
: <include>src
|
: <include>src
|
||||||
<boost>system:<library>boost_python
|
<boost>system:<library>boost_python
|
||||||
<boost>source,<boost-link>static:<library>/boost/python//boost_python/<link>static
|
|
||||||
<boost>source,<boost-link>shared:<library>/boost/python//boost_python/<link>shared
|
<boost>source,<boost-link>shared:<library>/boost/python//boost_python/<link>shared
|
||||||
<conditional>@libtorrent_linking
|
<conditional>@libtorrent_linking
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue