From 7902d2032d45f0f44ffad19362e62b301467c918 Mon Sep 17 00:00:00 2001
From: Xavier Claessens <xavier.claessens@collabora.com>
Date: Mon, 3 Aug 2020 10:05:38 -0400
Subject: Refactor handling of machine file options

It is much easier to not try to parse options into complicated
structures until we actually collected all options: machine files,
command line, project()'s default_options, environment.
---
 mesonbuild/compilers/compilers.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

(limited to 'mesonbuild/compilers/compilers.py')

diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index fd3bdb7..0f074bb 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -28,7 +28,7 @@ from ..mesonlib import (
     Popen_safe, split_args, LibType
 )
 from ..envconfig import (
-    Properties, get_env_var
+    get_env_var
 )
 
 from ..arglist import CompilerArgs
@@ -1246,8 +1246,7 @@ def get_args_from_envvars(lang: str,
 def get_global_options(lang: str,
                        comp: T.Type[Compiler],
                        for_machine: MachineChoice,
-                       is_cross: bool,
-                       properties: Properties) -> 'OptionDictType':
+                       is_cross: bool) -> 'OptionDictType':
     """Retreive options that apply to all compilers for a given language."""
     description = 'Extra arguments passed to the {}'.format(lang)
     opts = {
@@ -1267,11 +1266,7 @@ def get_global_options(lang: str,
         comp.INVOKES_LINKER)
 
     for k, o in opts.items():
-        user_k = lang + '_' + k
-        if user_k in properties:
-            # Get from configuration files.
-            o.set_value(properties[user_k])
-        elif k == 'args':
+        if k == 'args':
             o.set_value(compile_args)
         elif k == 'link_args':
             o.set_value(link_args)
-- 
cgit v1.1