aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-10-26 12:45:35 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2020-11-05 21:24:20 +0200
commit7860a6aeab9514391f02923a7f6357f094c8af68 (patch)
tree57e7b9bf1f89ab5e5d1133a97a550ea237527046 /mesonbuild/backend
parentbe2c1a43000db0a84a76522b23b80d597e08f663 (diff)
downloadmeson-7860a6aeab9514391f02923a7f6357f094c8af68.zip
meson-7860a6aeab9514391f02923a7f6357f094c8af68.tar.gz
meson-7860a6aeab9514391f02923a7f6357f094c8af68.tar.bz2
rust: implement support for --edition
Using the std option, so now `rust_std=..` will work. I've chosen to use "std" even though rust calls these "editions", as meson refers to language versions as "standards", which makes meson feel more uniform, and be less surprising. Fixes: #5100
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/ninjabackend.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 2ffbb85..09f06da 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1524,10 +1524,13 @@ int dummy;
for a in rustc.linker.get_always_args():
args += ['-C', 'link-arg={}'.format(a)]
+ opt_proxy = self.get_compiler_options_for_target(target)[rustc.language]
+
args += ['--crate-name', target.name]
args += rustc.get_buildtype_args(self.get_option_for_target('buildtype', target))
args += rustc.get_debug_args(self.get_option_for_target('debug', target))
args += rustc.get_optimization_args(self.get_option_for_target('optimization', target))
+ args += rustc.get_option_compile_args(opt_proxy)
args += self.build.get_global_args(rustc, target.for_machine)
args += self.build.get_project_args(rustc, target.subproject, target.for_machine)
depfile = os.path.join(target.subdir, target.name + '.d')