2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-21 02:52:12 +00:00

Don't link Boost.Python to python library, and don't require

<threading>multi for embedding applications.

* libs/python/build/Jamfile.v2: (boost_python): Don't link
  to /python//python. Use /python//python_for_extensions.

* libs/python/test/Jamfile.v2: Remove <threading>multi project
  requirements.
  (py-run): Link to /python//python.
  (exec): Likewise.

* tools/build/v2/tools/python.jam: (pthread): Declare.
  (init-unix): Add 'pthread' to extra-libs.
  (


[SVN r34662]
This commit is contained in:
Vladimir Prus
2006-07-22 07:12:10 +00:00
parent 9865754549
commit eea24b89c1

View File

@@ -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,7 +131,7 @@ rule init-unix ( version ? : root ? : includes ? : libraries ? : condition * )
flags python.capture-output PYTHON $(condition:J=/) : $(interpreter) ;
}
local extra-libs ;
switch [ os.name ]
@@ -140,6 +142,16 @@ rule init-unix ( version ? : root ? : includes ? : libraries ? : condition * )
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
# loaded in the interpreter, the symbols in the interpreter