aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py21
1 files changed, 7 insertions, 14 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 871cd48..2d16956 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -29,7 +29,9 @@ from . import GResourceTarget, GResourceHeaderTarget, GirTarget, TypelibTarget,
from . import get_include_args
from . import ExtensionModule
from . import ModuleReturnValue
-from ..mesonlib import MesonException, OrderedSet, Popen_safe, extract_as_list
+from ..mesonlib import (
+ MachineChoice, MesonException, OrderedSet, Popen_safe, extract_as_list
+)
from ..dependencies import Dependency, PkgConfigDependency, InternalDependency
from ..interpreterbase import noKwargs, permittedKwargs, FeatureNew, FeatureNewKwargs
@@ -531,11 +533,7 @@ class GnomeModule(ExtensionModule):
ret = []
for lang in langs:
- if state.environment.is_cross_build():
- link_args = state.environment.properties.host.get_external_link_args(lang)
- else:
- link_args = state.environment.coredata.get_external_link_args(lang)
-
+ link_args = state.environment.coredata.get_external_link_args(MachineChoice.HOST, lang)
for link_arg in link_args:
if link_arg.startswith('-L'):
ret.append(link_arg)
@@ -720,10 +718,7 @@ class GnomeModule(ExtensionModule):
def _get_external_args_for_langs(self, state, langs):
ret = []
for lang in langs:
- if state.environment.is_cross_build():
- ret += state.environment.properties.host.get_external_args(lang)
- else:
- ret += state.environment.coredata.get_external_args(lang)
+ ret += state.environment.coredata.get_external_args(MachineChoice.HOST, lang)
return ret
@staticmethod
@@ -1048,13 +1043,11 @@ This will become a hard error in the future.''')
ldflags.update(internal_ldflags)
ldflags.update(external_ldflags)
+ cflags.update(state.environment.coredata.get_external_args(MachineChoice.HOST, 'c'))
+ ldflags.update(state.environment.coredata.get_external_link_args(MachineChoice.HOST, 'c'))
if state.environment.is_cross_build():
- cflags.update(state.environment.properties.host.get_external_args('c'))
- ldflags.update(state.environment.properties.host.get_external_link_args('c'))
compiler = state.environment.coredata.cross_compilers.get('c')
else:
- cflags.update(state.environment.coredata.get_external_args('c'))
- ldflags.update(state.environment.coredata.get_external_link_args('c'))
compiler = state.environment.coredata.compilers.get('c')
compiler_flags = self._get_langs_compilers_flags(state, [('c', compiler)])