summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/xcodebackend.py
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-10-04 20:52:08 -0400
committerJohn Ericson <git@JohnEricson.me>2019-06-09 13:13:25 -0400
commit07777e15d47dbddaf849d24b3a30c85745c533ca (patch)
treef472472ed511498c329b4e13e19b1585e1afb621 /mesonbuild/backend/xcodebackend.py
parent32e827dcdc451e1c5dde952cf08e4b654eac7057 (diff)
downloadmeson-07777e15d47dbddaf849d24b3a30c85745c533ca.tar.gz
Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
Diffstat (limited to 'mesonbuild/backend/xcodebackend.py')
-rw-r--r--mesonbuild/backend/xcodebackend.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index be22c7846..7c6625081 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -742,10 +742,10 @@ class XCodeBackend(backends.Backend):
if lang not in langnamemap:
continue
# Add compile args added using add_project_arguments()
- pargs = self.build.projects_args.get(target.subproject, {}).get(lang, [])
+ pargs = self.build.projects_args[target.for_machine].get(target.subproject, {}).get(lang, [])
# Add compile args added using add_global_arguments()
# These override per-project arguments
- gargs = self.build.global_args.get(lang, [])
+ gargs = self.build.global_args[target.for_machine].get(lang, [])
targs = target.get_extra_args(lang)
args = pargs + gargs + targs
if args: