aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-08-03 10:05:38 -0400
committerXavier Claessens <xclaesse@gmail.com>2020-10-16 17:42:24 -0400
commit7902d2032d45f0f44ffad19362e62b301467c918 (patch)
treeb00d24c55c77c92da522458e5a7038fb01dd9b7d /mesonbuild/compilers/compilers.py
parentc3b3dc598e8c417e66792444945f7c803d772e62 (diff)
downloadmeson-7902d2032d45f0f44ffad19362e62b301467c918.zip
meson-7902d2032d45f0f44ffad19362e62b301467c918.tar.gz
meson-7902d2032d45f0f44ffad19362e62b301467c918.tar.bz2
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.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py11
1 files changed, 3 insertions, 8 deletions
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)