summaryrefslogtreecommitdiffstats
path: root/waftools
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-06-16 15:17:46 +0200
committerJan Ekström <jeebjp@gmail.com>2018-07-08 14:39:04 +0300
commit93ec08cc7f2122f365469d8eb82b9bfbdbb2c4f8 (patch)
tree823ce66dee4279e8f66103d5686a06c7cc05097d /waftools
parent4bf9a78b364483f2c4f0ee429510f32f891932bc (diff)
downloadmpv-93ec08cc7f2122f365469d8eb82b9bfbdbb2c4f8.tar.bz2
mpv-93ec08cc7f2122f365469d8eb82b9bfbdbb2c4f8.tar.xz
build: fix linking libmpv when swift features are build
this was caused by commit 2e7a4f7. the LAST_LINKFLAGS were not added to the linking of libmpv and that caused a linking error. manually add the link flags the same way it's done when linking mpv. Fixes #5968
Diffstat (limited to 'waftools')
-rw-r--r--waftools/waf_customizations.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/waftools/waf_customizations.py b/waftools/waf_customizations.py
index f264f9cb86..f0db04c614 100644
--- a/waftools/waf_customizations.py
+++ b/waftools/waf_customizations.py
@@ -28,18 +28,25 @@ def m_hook(self, node):
"""
return self.create_compiled_task('c', node)
+def try_last_linkflags(cls):
+ try:
+ return cls.orig_run_str + ' ${LAST_LINKFLAGS}'
+ except AttributeError:
+ try:
+ return cls.hcode + ' ${LAST_LINKFLAGS}'
+ except TypeError:
+ return cls.hcode.decode('iso8859-1') + ' ${LAST_LINKFLAGS}'
+
def build(ctx):
from waflib import Task
cls = Task.classes['cprogram']
class cprogram(cls):
- try:
- run_str = cls.orig_run_str + ' ${LAST_LINKFLAGS}'
- except AttributeError:
- try:
- run_str = cls.hcode + ' ${LAST_LINKFLAGS}'
- except TypeError:
- run_str = cls.hcode.decode('iso8859-1') + ' ${LAST_LINKFLAGS}'
+ run_str = try_last_linkflags(cls)
+
+ cls = Task.classes['cshlib']
+ class cshlib(cls):
+ run_str = try_last_linkflags(cls)
cls = Task.classes['macplist']
class macplist(cls):