Skip to content
Merged
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
15 changes: 0 additions & 15 deletions tests/ui/abi/lib-defaults.rs

This file was deleted.

17 changes: 17 additions & 0 deletions tests/ui/link-native-libs/lib-defaults.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//! By default, `-l NAME` without an explicit kind will default to dylib. However, if there's also
//! an `#[link(name = NAME, kind = KIND)]` attribute with an explicit `KIND`, it should override the
//! CLI flag. In particular, this should not result in any duplicate flag warnings from the linker.
//@ run-pass
//@ compile-flags: -lrust_test_helpers

#[link(name = "rust_test_helpers", kind = "static")]
extern "C" {
pub fn rust_dbg_extern_identity_u32(x: u32) -> u32;
}

fn main() {
unsafe {
rust_dbg_extern_identity_u32(42);
}
}
Loading