summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2019-09-21 23:33:07 +0200
committerJan Ekström <jeebjp@gmail.com>2019-09-22 17:14:31 +0300
commit9e52d369626483a7523ab5800cd5443db0cfb576 (patch)
tree289486557513957b173f4a022d7776fff8240157
parente3972746dc18473ad577d04547d0f05775da4658 (diff)
downloadmpv-9e52d369626483a7523ab5800cd5443db0cfb576.tar.bz2
mpv-9e52d369626483a7523ab5800cd5443db0cfb576.tar.xz
build: optimise adding additional objects for linking
splitting the string by spaces isn't the best idea, so we use a proper list instead now.
-rw-r--r--waftools/generators/sources.py4
-rw-r--r--wscript_build.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/waftools/generators/sources.py b/waftools/generators/sources.py
index a807ca00bb..bbca38c06d 100644
--- a/waftools/generators/sources.py
+++ b/waftools/generators/sources.py
@@ -96,8 +96,8 @@ def __wayland_protocol_header__(ctx, **kwargs):
@TaskGen.feature('apply_link')
@TaskGen.after_method('process_source', 'process_use', 'apply_link', 'process_uselib_local', 'propagate_uselib_vars', 'do_the_symbol_stuff')
def handle_add_object(tgen):
- if getattr(tgen, 'add_object', None):
- for input in Utils.to_list(tgen.add_object):
+ if getattr(tgen, 'add_objects', None):
+ for input in tgen.add_objects:
input_node = tgen.path.find_resource(input)
if input_node is not None:
tgen.link_task.inputs.append(input_node)
diff --git a/wscript_build.py b/wscript_build.py
index 55924213cd..1a495fad27 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -580,16 +580,16 @@ def build(ctx):
syms = True
ctx.load("syms")
- additonal_objects = ""
+ additional_objects = []
if ctx.dependency_satisfied('swift'):
- additonal_objects = "osdep/macOS_swift.o"
+ additional_objects.append("osdep/macOS_swift.o")
if ctx.dependency_satisfied('cplayer'):
ctx(
target = "mpv",
source = main_fn_c,
use = ctx.dependencies_use() + ['objects'],
- add_object = additonal_objects,
+ add_objects = additional_objects,
includes = _all_includes(ctx),
features = "c cprogram" + (" syms" if syms else ""),
export_symbols_def = "libmpv/mpv.def", # for syms=True
@@ -646,7 +646,7 @@ def build(ctx):
"target": "mpv",
"source": ctx.filtered_sources(sources),
"use": ctx.dependencies_use(),
- "add_object": additonal_objects,
+ "add_objects": additional_objects,
"includes": [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \
ctx.dependencies_includes(),
"features": features,