From e430c01ef51f0fabba8bd6170287c42f718e7854 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 10 Nov 2020 12:05:47 -0800 Subject: compilers/rust: Add vs_crt support As far as I can Tell, rust just handles this for us (it's always worked with no special arguments from us). However, since we're going to add support for base options for rust, we need to add the method. --- mesonbuild/compilers/rust.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mesonbuild') diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 469859b..3b392ec 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -52,6 +52,8 @@ class RustCompiler(Compiler): linker=linker) self.exe_wrapper = exe_wrapper self.id = 'rustc' + if 'link' in self.linker.id: + self.base_options.append('b_vscrt') def needs_static_linker(self) -> bool: return False @@ -141,3 +143,7 @@ class RustCompiler(Compiler): if std.value != 'none': args.append('--edition=' + std.value) return args + + def get_crt_compile_args(self, crt_val: str, buildtype: str) -> T.List[str]: + # Rust handles this for us, we don't need to do anything + return [] -- cgit v1.1