From 7658e67f92ba55e2d8e466f818293a001f34a65f Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 2 Dec 2019 12:52:42 -0800 Subject: [PATCH] backends/ninja: apply linker arguments when using rust This will be required to make switching the linker work with rust. --- mesonbuild/backend/ninjabackend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 3c5cdf025..9ff6f74cc 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1293,6 +1293,8 @@ int dummy; else: raise InvalidArguments('Unknown target type for rustc.') args.append(cratetype) + if cratetype in {'bin', 'dylib'}: + args += rustc.linker.get_always_args() 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))