summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2019-04-21 16:57:02 +0200
committerJan Ekström <jeebjp@gmail.com>2019-07-21 18:13:07 +0300
commit3f6d79ddb688ad8f3dbc0b1b652142605af85f82 (patch)
tree1fd6bb38cdfc88fefab08708fef275e819d2b33c /wscript
parent770fc5221528e18c17e7b3664ad300a96cdace3a (diff)
downloadmpv-3f6d79ddb688ad8f3dbc0b1b652142605af85f82.tar.bz2
mpv-3f6d79ddb688ad8f3dbc0b1b652142605af85f82.tar.xz
build: add Swift dynamic linking support
this is in preparation for the upcoming swift 5 transition, where static linking was replaced by dynamic linking the swift libraries as the preferred way, by Apple. furthermore Apple removed the static swift libs from their dev Tools starting with xcode 10.2/swift 5. because of ABI incompatibility dynamic linking for swift versions prior to 5 doesn't use the system lib path for the dynamic swift libs. for now static linking is still the default, but that will be changed when swift 5 support is added and swift 3 support is dropped. Fixes #6232
Diffstat (limited to 'wscript')
-rw-r--r--wscript5
1 files changed, 5 insertions, 0 deletions
diff --git a/wscript b/wscript
index 121f3613af..76cfe1ddd3 100644
--- a/wscript
+++ b/wscript
@@ -125,6 +125,11 @@ build_options = [
'desc': 'generate a clang compilation database',
'func': check_true,
'default': 'disable',
+ } , {
+ 'name': '--swift-static',
+ 'desc': 'static Swift linking',
+ 'deps': 'os-darwin',
+ 'func': check_ctx_vars('SWIFT_LIB_STATIC')
}
]