[PATCH 06/11] rust: Meson now adds -Cdefault-linker-libraries

Paolo Bonzini posted 11 patches 1 month, 3 weeks ago
[PATCH 06/11] rust: Meson now adds -Cdefault-linker-libraries
Posted by Paolo Bonzini 1 month, 3 weeks ago
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/meson.build b/meson.build
index 02738c9765f..e2de3832ac3 100644
--- a/meson.build
+++ b/meson.build
@@ -136,13 +136,7 @@ if have_rust
     rustc_lint_args += ['-Dwarnings', '-Funknown_lints']
   endif
 
-  # Apart from procedural macros, our Rust executables will often link
-  # with C code, so include all the libraries that C code needs.  This
-  # is safe; https://github.com/rust-lang/rust/pull/54675 says that
-  # passing -nodefaultlibs to the linker "was more ideological to
-  # start with than anything".
-  add_project_arguments(rustc_lint_args +
-      ['--cfg', 'MESON', '-C', 'default-linker-libraries'],
+  add_project_arguments(rustc_lint_args + ['--cfg', 'MESON'],
       native: false, language: 'rust')
   add_project_arguments(rustc_lint_args + ['--cfg', 'MESON'],
       native: true, language: 'rust')
-- 
2.52.0
Re: [PATCH 06/11] rust: Meson now adds -Cdefault-linker-libraries
Posted by Zhao Liu 1 month, 3 weeks ago
On Mon, Dec 15, 2025 at 08:49:55AM +0100, Paolo Bonzini wrote:
> Date: Mon, 15 Dec 2025 08:49:55 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 06/11] rust: Meson now adds -Cdefault-linker-libraries
> X-Mailer: git-send-email 2.52.0
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  meson.build | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

Reviwed-by: Zhao Liu <zhao1.liu@intel.com>