mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 13:42:14 +00:00
Merge: Don't link Boost.Python to python library
[SVN r34663]
This commit is contained in:
@@ -50,6 +50,8 @@ lib dl ;
|
||||
# This contains 'openpty' function need by python. Again, on
|
||||
# some system need to pass this to linker explicitly.
|
||||
lib util ;
|
||||
# Python uses pthread symbols.
|
||||
lib pthread ;
|
||||
|
||||
|
||||
# Initializes the Python toolset.
|
||||
@@ -129,21 +131,26 @@ rule init-unix ( version ? : root ? : includes ? : libraries ? : condition * )
|
||||
flags python.capture-output PYTHON $(condition:J=/) : $(interpreter) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
local extra-libs ;
|
||||
if [ os.name ] = SOLARIS
|
||||
|
||||
switch [ os.name ]
|
||||
{
|
||||
extra-libs = dl ;
|
||||
}
|
||||
else if [ os.name ] = OSF || [ os.name ] = QNXTO
|
||||
{
|
||||
# Nothing.
|
||||
}
|
||||
else
|
||||
{
|
||||
extra-libs = dl util ;
|
||||
case SOLARIS : extra-libs = dl ;
|
||||
case OSF : extra-libs = ;
|
||||
case QNXTO : extra-libs = util ;
|
||||
case * : extra-libs = dl util ;
|
||||
}
|
||||
|
||||
# Depending on system, Python library is either static
|
||||
# or shared. When it's static, we need to add 'pthread'
|
||||
# to link line of all clients, otherwise we'll get
|
||||
# unresolved symbols. Same effect can be accomplished
|
||||
# by using <threading>multi on the client, but
|
||||
# that can have performance overhead, and is not really
|
||||
# necessary, as Python interface has nothing that's
|
||||
# affected by threading mode.
|
||||
extra-libs += pthread ;
|
||||
|
||||
# On Linux, we don't want to link either Boost.Python or
|
||||
# Python extensions to libpython, so that when extensions
|
||||
@@ -159,7 +166,7 @@ rule init-unix ( version ? : root ? : includes ? : libraries ? : condition * )
|
||||
;
|
||||
|
||||
alias python
|
||||
: $(extra-libs)
|
||||
: $(extra-libs)
|
||||
: $(condition)
|
||||
:
|
||||
: <include>$(includes)
|
||||
|
||||
Reference in New Issue
Block a user