-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite interdependent-c-libraries to rmake
- Loading branch information
Showing
3 changed files
with
19 additions
and
16 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 was deleted.
Oops, something went wrong.
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,19 @@ | ||
// The rust crate foo will link to the native library foo, while the rust crate | ||
// bar will link to the native library bar. There is also a dependency between | ||
// the native library bar to the natibe library foo. | ||
// This test ensures that the ordering of -lfoo and -lbar on the command line is | ||
// correct to complete the linkage. If passed as "-lfoo -lbar", then the 'foo' | ||
// library will be stripped out, and the linkage will fail. | ||
// See https://github.com/rust-lang/rust/commit/e6072fa0c4c22d62acf3dcb78c8ee260a1368bd7 | ||
|
||
// FIXME(Oneirical): test-various | ||
|
||
use run_make_support::{build_native_static_lib, rustc}; | ||
|
||
fn main() { | ||
build_native_static_lib("foo"); | ||
build_native_static_lib("bar"); | ||
rustc().input("foo.rs").run(); | ||
rustc().input("bar.rs").run(); | ||
rustc().input("main.rs").print("link-args").run(); | ||
} |