summaryrefslogtreecommitdiff
path: root/test cases/rust
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-08-04 14:28:11 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-08-04 09:08:36 -0700
commite99253c1bd452e385c9f20ca63d5e06c85759972 (patch)
tree5b8a7b6bb89cfb78f49d3502673c22cfe8af167b /test cases/rust
parent070579542f19196abd06beb9e67a9a9012469225 (diff)
downloadmeson-e99253c1bd452e385c9f20ca63d5e06c85759972.tar.gz
build: fix introspection interpreter issue when project selects Rust
The introspection interpreter sometimes produces targets with no source files; BuildTarget will then pick a random compiler, according to the order in clink_langs. According to the comment in sort_clink, clink_langs are supposed to list languages from *lowest* to highest priority. However, process_compilers_late() process clink_langs in straight order and returns the first language; which is the one with lowest priority. This became visible with the addition of Rust to clink_langs, because Rust has limitation on the names of library targets, but the bug existed before. Fixes: e49f2f7283e1d9f18e2f5f54647c07287cd70339 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'test cases/rust')
-rw-r--r--test cases/rust/20 rust and cpp/meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/test cases/rust/20 rust and cpp/meson.build b/test cases/rust/20 rust and cpp/meson.build
index c3010123a..2a545f9bf 100644
--- a/test cases/rust/20 rust and cpp/meson.build
+++ b/test cases/rust/20 rust and cpp/meson.build
@@ -8,7 +8,7 @@ project(
meson_version : '>= 1.2.0',
)
-cpplib = static_library('cpp', 'lib.cpp')
+cpplib = static_library('cpp-lib', 'lib.cpp')
exe = executable('main', 'main.rs', link_with : cpplib)
test('main', exe)