backends/ninja: apply linker arguments when using rust

This will be required to make switching the linker work with rust.
pull/6207/head
Dylan Baker 5 years ago
parent 5a83cb0d33
commit 7658e67f92
  1. 2
      mesonbuild/backend/ninjabackend.py

@ -1293,6 +1293,8 @@ int dummy;
else: else:
raise InvalidArguments('Unknown target type for rustc.') raise InvalidArguments('Unknown target type for rustc.')
args.append(cratetype) args.append(cratetype)
if cratetype in {'bin', 'dylib'}:
args += rustc.linker.get_always_args()
args += ['--crate-name', target.name] args += ['--crate-name', target.name]
args += rustc.get_buildtype_args(self.get_option_for_target('buildtype', target)) args += rustc.get_buildtype_args(self.get_option_for_target('buildtype', target))
args += rustc.get_debug_args(self.get_option_for_target('debug', target)) args += rustc.get_debug_args(self.get_option_for_target('debug', target))

Loading…
Cancel
Save