diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2024-06-09 01:03:49 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-06-09 01:27:49 +0300 |
commit | fb4fb081f672ee129a8836b3c38ccf5992ec4fc7 (patch) | |
tree | b19f1e9e54a8cc8e00e95b2c32d56b8921389868 /mesonbuild/compilers/compilers.py | |
parent | 3c7d4e0ebf6e380666c5af249391a68556a44e3c (diff) | |
download | meson-optstorerefactor.zip meson-optstorerefactor.tar.gz meson-optstorerefactor.tar.bz2 |
Replace direct indexing with named methods.optstorerefactor
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index ef0ea70..5849d8c 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -322,9 +322,9 @@ def get_base_compile_args(options: 'KeyedOptionDictType', compiler: 'Compiler', if option_enabled(compiler.base_options, options, OptionKey('b_bitcode')): args.append('-fembed-bitcode') try: - crt_val = options[OptionKey('b_vscrt')].value - buildtype = options[OptionKey('buildtype')].value try: + crt_val = options.get_value(OptionKey('b_vscrt')) + buildtype = options.get_value(OptionKey('buildtype')) args += compiler.get_crt_compile_args(crt_val, buildtype) except AttributeError: pass @@ -390,9 +390,9 @@ def get_base_link_args(options: 'KeyedOptionDictType', linker: 'Compiler', args.extend(linker.get_allow_undefined_link_args()) try: - crt_val = options[OptionKey('b_vscrt')].value - buildtype = options[OptionKey('buildtype')].value try: + crt_val = options.get_value(OptionKey('b_vscrt')) + buildtype = options.get_value(OptionKey('buildtype')) args += linker.get_crt_link_args(crt_val, buildtype) except AttributeError: pass |