Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ impl<'test> TestCx<'test> {
} else if aux_type.is_some() {
panic!("aux_type {aux_type:?} not expected");
} else if aux_props.no_prefer_dynamic {
(AuxType::Dylib, None)
(AuxType::Lib, None)
} else if self.config.target.contains("emscripten")
|| (self.config.target.contains("musl")
&& !aux_props.force_host
Expand Down
10 changes: 10 additions & 0 deletions tests/ui/compiletest-self-test/auxiliary/no_prefer_dynamic_lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//@ no-prefer-dynamic

//! Since this is `no-prefer-dynamic` we expect compiletest to _not_ look for
//! this create as `libno_prefer_dynamic_lib.so`.

#![crate_type = "rlib"]

pub fn return_42() -> i32 {
42
}
10 changes: 10 additions & 0 deletions tests/ui/compiletest-self-test/no-prefer-dynamic-means-no-so.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! Since we and our aux-crate is `no-prefer-dynamic` we expect compiletest to
//! _not_ look for `libno_prefer_dynamic_lib.so`.

//@ check-pass
//@ no-prefer-dynamic
//@ aux-crate: no_prefer_dynamic_lib=no_prefer_dynamic_lib.rs

fn main() {
no_prefer_dynamic_lib::return_42();
}
Loading