diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2019-06-12 18:08:45 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-04-20 23:23:15 +0300 |
commit | 278c294aa45efc3e8b068bcd7632828ed5c92523 (patch) | |
tree | 36372ef2c9a5897cca87e8c44628c8f9e00c368e /mesonbuild/environment.py | |
parent | e04b0ae6b6220381b4aa493289960a3555201717 (diff) | |
download | meson-278c294aa45efc3e8b068bcd7632828ed5c92523.zip meson-278c294aa45efc3e8b068bcd7632828ed5c92523.tar.gz meson-278c294aa45efc3e8b068bcd7632828ed5c92523.tar.bz2 |
Compiler options per lang
A current rather untyped storage of options is one of the things that
contributes to the options code being so complex. This takes a small
step in synching down by storing the compiler options in dicts per
language.
Future work might be replacing the langauge strings with an enum, and
defaultdict with a custom struct, just like `PerMachine` and
`MachineChoice`.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 11bc76c..c571141 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -771,7 +771,7 @@ class Environment: elif isinstance(comp_class.LINKER_PREFIX, list): check_args = comp_class.LINKER_PREFIX + ['/logo'] + comp_class.LINKER_PREFIX + ['--version'] - check_args += self.coredata.compiler_options[for_machine][comp_class.language + '_args'].value + check_args += self.coredata.compiler_options[for_machine][comp_class.language]['args'].value override = [] # type: T.List[str] value = self.lookup_binary_entry(for_machine, comp_class.language + '_ld') @@ -833,7 +833,7 @@ class Environment: """ self.coredata.add_lang_args(comp_class.language, comp_class, for_machine, self) extra_args = T.cast(T.List[str], extra_args or []) - extra_args += self.coredata.compiler_options[for_machine][comp_class.language + '_args'].value + extra_args += self.coredata.compiler_options[for_machine][comp_class.language]['args'].value if isinstance(comp_class.LINKER_PREFIX, str): check_args = [comp_class.LINKER_PREFIX + '--version'] + extra_args |