From 76eba998504b4205ea04859ba4c26f4a609afd94 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 13 Jul 2023 09:28:59 -0700 Subject: rust: disable overflow-checks by default These result in very large binaries when linked, and are not generally useful. A user can turn them back on by passing `-C overflow-checks=yes` manually via `-Drust_args` or the `RUSTFLAGS` environment variable fixes: #11785 --- mesonbuild/compilers/rust.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/rust.py') diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 13674ed15..ef0390e97 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -217,7 +217,7 @@ class RustCompiler(Compiler): def get_assert_args(self, disable: bool) -> T.List[str]: action = "no" if disable else "yes" - return ['-C', f'debug-assertions={action}'] + return ['-C', f'debug-assertions={action}', '-C', 'overflow-checks=no'] class ClippyRustCompiler(RustCompiler): -- cgit v1.2.3