summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-05-11 11:37:56 +0200
committerAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-05-11 13:36:04 +0000
commitcdbd5528625ea3b1fe429134013f7cc6dd18b41f (patch)
tree1abd6632481783329dc342bc1641974b1c996e4a
parent5ce67f34294d07df45e4d84ece278e820874461c (diff)
Add option to link with libc++ on older OSX versions.
Versions of OSX lower than 10.9 link libstdc++ by default. Also libstdc++ is linked when the osx minimum deployment target is lower than 10.9. The new option allows explicitly linking libc++ in the cases mentioned above. It is not enabled by default, because most libraries and executables on versions lower than 10.9 are compiled with libstdc++, and mixing standard library versions can lead to crashes. Change-Id: I7397d2bbce2cfceaeb848f25e0bbf1a24ac9bde8 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--setup.py10
m---------sources/pyside213
m---------sources/pyside2-tools0
m---------sources/shiboken213
4 files changed, 26 insertions, 10 deletions
diff --git a/setup.py b/setup.py
index b7cd3fb9..236d9f1e 100644
--- a/setup.py
+++ b/setup.py
@@ -160,6 +160,7 @@ OPTION_JOBS = option_value('jobs') # number of parallel build job
OPTION_JOM = has_option('jom') # use jom instead of nmake with msvc
OPTION_BUILDTESTS = has_option("build-tests")
OPTION_OSXARCH = option_value("osx-arch")
+OPTION_OSX_USE_LIBCPP = has_option("osx-use-libc++")
OPTION_XVFB = has_option("use-xvfb")
if OPTION_QT_VERSION is None:
@@ -634,6 +635,15 @@ class pyside_build(_build):
# also tell cmake which architecture to use
cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(OPTION_OSXARCH))
+ if OPTION_OSX_USE_LIBCPP:
+ # Explicitly link the libc++ standard library (useful for osx deployment targets
+ # lower than 10.9). This is not on by default, because most libraries and
+ # executables on OSX <= 10.8 are linked to libstdc++, and mixing standard libraries
+ # can lead to crashes.
+ # On OSX >= 10.9 with a similar minimum deployment target, libc++ is linked in
+ # implicitly, thus the option is a no-op in those cases.
+ cmake_cmd.append("-DOSX_USE_LIBCPP=ON")
+
log.info("Configuring module %s (%s)..." % (extension, module_src_dir))
if run_process(cmake_cmd) != 0:
raise DistutilsSetupError("Error configuring " + extension)
diff --git a/sources/pyside2 b/sources/pyside2
-Subproject 131fdfd1a89a257094148c07c630f136752c703
+Subproject e64dda26eb2042a8c0cd7c8a33b134dcf097936
diff --git a/sources/pyside2-tools b/sources/pyside2-tools
-Subproject 1eb5ccf5208d775e1e70b2332d9a61df0061280
+Subproject c8608f268f6461c421055ff3df1fd72d616cb64
diff --git a/sources/shiboken2 b/sources/shiboken2
-Subproject 9b4a3cfcee9cfd5a98c33b29ec4ecfd8d3e973f
+Subproject 4ba52d8a955613985485b14faf76aa66bac08cc