diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-20 00:42:13 +0100 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-02-03 20:01:37 -0500 |
| commit | 4276f1d482095ea003ec39de0fd17ab16dab4b95 (patch) | |
| tree | 030039b48cd7ac5f35b3b5548432d3c093daf0a8 | |
| parent | ab5e67a57c62c80c16e4d9c71740b01b424a6f30 (diff) | |
| download | meson-4276f1d482095ea003ec39de0fd17ab16dab4b95.tar.gz | |
ninjabackend: rust: remove code duplication
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | mesonbuild/backend/ninjabackend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 5ac5ed6ca..21ca38c0d 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1993,7 +1993,7 @@ class NinjaBackend(backends.Backend): orderdeps.append(fname) if main_rust_file is None: raise RuntimeError('A Rust target has no Rust sources. This is weird. Also a bug. Please report') - target_name = os.path.join(target.subdir, target.get_filename()) + target_name = self.get_target_filename(target) cratetype = target.rust_crate_type args.extend(['--crate-type', cratetype]) @@ -2056,7 +2056,7 @@ class NinjaBackend(backends.Backend): # dependency, so that collisions with libraries in rustc's # sysroot don't cause ambiguity d_name = self._get_rust_dependency_name(target, d) - args += ['--extern', '{}={}'.format(d_name, os.path.join(d.subdir, d.filename))] + args += ['--extern', '{}={}'.format(d_name, self.get_target_filename(d))] project_deps.append(RustDep(d_name, self.rust_crates[d.name].order)) continue |
