-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa7734f
commit cbaa24d
Showing
5 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[no_mangle] | ||
pub extern "C" fn native_lib_alt_naming() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// On MSVC the alternative naming format for static libraries (`libfoo.a`) is accepted in addition | ||
// to the default format (`foo.lib`). | ||
|
||
//REMOVE@ only-msvc | ||
|
||
use run_make_support::rustc; | ||
|
||
fn main() { | ||
// Prepare the native library. | ||
rustc().input("native.rs").crate_type("staticlib").output("libnative.a").run(); | ||
|
||
// Try to link to it from both a rlib and a bin. | ||
rustc().input("rust.rs").crate_type("rlib").arg("-lstatic=native").run(); | ||
rustc().input("rust.rs").crate_type("bin").arg("-lstatic=native").run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub fn main() {} |