summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/rust.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2024-07-12 20:57:04 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2024-07-17 18:37:51 +0300
commit61c742fae9ec74e81b3bb3caf815cf49992fb93c (patch)
tree18b604a698220c713cba3b443c279c7a65f4f6dc /mesonbuild/modules/rust.py
parentde8e3d65e06f91f0927e84dbf215a298b73590b8 (diff)
downloadmeson-61c742fae9ec74e81b3bb3caf815cf49992fb93c.tar.gz
Remove language (AKA compiler) type from OptionKey.
Diffstat (limited to 'mesonbuild/modules/rust.py')
-rw-r--r--mesonbuild/modules/rust.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/rust.py b/mesonbuild/modules/rust.py
index a8e22541c..2e5f16f3c 100644
--- a/mesonbuild/modules/rust.py
+++ b/mesonbuild/modules/rust.py
@@ -269,7 +269,7 @@ class RustModule(ExtensionModule):
raise InterpreterException(f'Unknown file type extension for: {name}')
# We only want include directories and defines, other things may not be valid
- cargs = state.get_option('args', state.subproject, lang=language)
+ cargs = state.get_option(f'{language}_args', state.subproject)
assert isinstance(cargs, list), 'for mypy'
for a in itertools.chain(state.global_args.get(language, []), state.project_args.get(language, []), cargs):
if a.startswith(('-I', '/I', '-D', '/D', '-U', '/U')):
@@ -280,7 +280,7 @@ class RustModule(ExtensionModule):
# Add the C++ standard to the clang arguments. Attempt to translate VS
# extension versions into the nearest standard version
- std = state.get_option('std', lang=language)
+ std = state.get_option(f'{language}_std')
assert isinstance(std, str), 'for mypy'
if std.startswith('vc++'):
if std.endswith('latest'):