From 4f45b5937ddc9b5e839c08ff53a955b68a9f3376 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 17 May 2021 11:50:22 -0700 Subject: [PATCH] ninjabackend: Rust use Backend.generate_basic_compiler_args Instead of open coding it. This simplifies things, and fixes some missing functionality --- mesonbuild/backend/ninjabackend.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 7c97ca353..5dbbf8bdc 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1691,20 +1691,12 @@ class NinjaBackend(backends.Backend): if cratetype in {'bin', 'dylib'}: args.extend(rustc.get_linker_always_args()) - opt_proxy = self.get_compiler_options_for_target(target) - + args += self.generate_basic_compiler_args(target, rustc, False) args += ['--crate-name', target.name] - args += rustc.get_buildtype_args(self.get_option_for_target(OptionKey('buildtype'), target)) - args += rustc.get_debug_args(self.get_option_for_target(OptionKey('debug'), target)) - args += rustc.get_optimization_args(self.get_option_for_target(OptionKey('optimization'), target)) - args += rustc.get_option_compile_args(opt_proxy) - args += self.build.get_global_args(rustc, target.for_machine) - args += self.build.get_project_args(rustc, target.subproject, target.for_machine) depfile = os.path.join(target.subdir, target.name + '.d') args += ['--emit', f'dep-info={depfile}', '--emit', 'link'] args += target.get_extra_args('rust') args += rustc.get_output_args(os.path.join(target.subdir, target.get_filename())) - args += self.environment.coredata.get_external_args(target.for_machine, rustc.language) linkdirs = mesonlib.OrderedSet() external_deps = target.external_deps.copy() for d in target.link_targets: