Skip to content

Instantly share code, notes, and snippets.

@tdsmith
Created May 10, 2015 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdsmith/9026da299ac1bfd3f419 to your computer and use it in GitHub Desktop.
Save tdsmith/9026da299ac1bfd3f419 to your computer and use it in GitHub Desktop.
modified from https://github.com/boostorg/build/commit/b1c031d
diff --git a/src/tools/python.jam b/src/tools/python.jam
index 1a41a1e..90377ea 100644
--- a/tools/build/src/tools/python.jam
+++ b/tools/build/src/tools/python.jam
@@ -962,16 +962,18 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
# symbols. If we linked to libpython, we would get duplicate symbols. So
# declare two targets -- one for building extensions and another for
# embedding.
- #
- # Unlike most *nix systems, Mac OS X's linker does not permit undefined
- # symbols when linking a shared library. So, we still need to link against
- # the Python framework, even when building extensions. Note that framework
- # builds of Python always use shared libraries, so we do not need to worry
- # about duplicate Python symbols.
- if $(target-os) in windows cygwin darwin
+ if $(target-os) in windows cygwin
{
alias python_for_extensions : python : $(target-requirements) ;
}
+ else if $(target-os) = darwin {
+ alias python_for_extensions
+ :
+ : $(target-requirements)
+ :
+ : $(usage-requirements) <linkflags>"-undefined dynamic_lookup"
+ ;
+ }
# On AIX we need Python extensions and Boost.Python to import symbols from
# the Python interpreter. Dynamic libraries opened with dlopen() do not
# inherit the symbols from the Python interpreter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment