summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-11-08 12:18:02 +0100
committerDylan Baker <dylan@pnwbakers.com>2025-11-12 14:56:22 -0800
commitc1e91e497ffbe1d795c3bb996f0a6c2e42fd5018 (patch)
treec2c112e8eeea9956f21b8537edaeca5f022dab51 /mesonbuild/compilers
parentc53317f7580a3cb8d92e832159ae38a1a278dba0 (diff)
downloadmeson-c1e91e497ffbe1d795c3bb996f0a6c2e42fd5018.tar.gz
rust: call compilers.get_base_link_args
The rustc invocation performs both compilation and linking, so it should include link-phase arguments for LTO or sanitizers. RustCompiler has been taught how to include these arguments, so now add them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/rust.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py
index a32499ce8..73c38148b 100644
--- a/mesonbuild/compilers/rust.py
+++ b/mesonbuild/compilers/rust.py
@@ -329,6 +329,9 @@ class RustCompiler(Compiler):
def get_crt_link_args(self, crt_val: str, buildtype: str) -> T.List[str]:
if not isinstance(self.linker, VisualStudioLikeLinkerMixin):
return []
+ # Rustc always use non-debug Windows runtime. Inject the one selected
+ # by Meson options instead.
+ # https://github.com/rust-lang/rust/issues/39016
return self.MSVCRT_ARGS[self.get_crt_val(crt_val, buildtype)]
def get_colorout_args(self, colortype: str) -> T.List[str]: