Merge pull request #4261 from rossburton/cross

WIP RFC gnome.py cross improvements
pull/4287/head
Jussi Pakkanen 6 years ago committed by GitHub
commit ca4c8de09f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      mesonbuild/modules/gnome.py
  2. 2
      mesonbuild/scripts/gtkdochelper.py

@ -518,7 +518,12 @@ class GnomeModule(ExtensionModule):
ret = []
for lang in langs:
for link_arg in state.environment.coredata.get_external_link_args(lang):
if state.environment.is_cross_build():
link_args = state.environment.cross_info.config["properties"].get(lang + '_link_args', "")
else:
link_args = state.environment.coredata.get_external_link_args(lang)
for link_arg in link_args:
if link_arg.startswith('-L'):
ret.append(link_arg)
@ -691,7 +696,10 @@ class GnomeModule(ExtensionModule):
def _get_external_args_for_langs(self, state, langs):
ret = []
for lang in langs:
ret += state.environment.coredata.get_external_args(lang)
if state.environment.is_cross_build():
ret += state.environment.cross_info.config["properties"].get(lang + '_args', "")
else:
ret += state.environment.coredata.get_external_args(lang)
return ret
@staticmethod
@ -1012,6 +1020,8 @@ This will become a hard error in the future.''')
ldflags.update(external_ldflags)
if state.environment.is_cross_build():
cflags.update(state.environment.cross_info.config["properties"].get('c_args', ""))
ldflags.update(state.environment.cross_info.config["properties"].get('c_link_args', ""))
compiler = state.environment.coredata.cross_compilers.get('c')
else:
cflags.update(state.environment.coredata.get_external_args('c'))

@ -66,7 +66,7 @@ def gtkdoc_run_check(cmd, cwd, library_paths=None):
# This preserves the order of messages.
p, out = Popen_safe(cmd, cwd=cwd, env=env, stderr=subprocess.STDOUT)[0:2]
if p.returncode != 0:
err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)]
err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)]
if out:
err_msg.append(out)
raise MesonException('\n'.join(err_msg))

Loading…
Cancel
Save