Skip to content

Commit 4dad2a3

Browse files
committed
rewrite interdependent-c-libraries to rmake
1 parent 54be9ad commit 4dad2a3

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ run-make/foreign-exceptions/Makefile
2121
run-make/foreign-rust-exceptions/Makefile
2222
run-make/incr-add-rust-src-component/Makefile
2323
run-make/incr-foreign-head-span/Makefile
24-
run-make/interdependent-c-libraries/Makefile
2524
run-make/issue-35164/Makefile
2625
run-make/issue-36710/Makefile
2726
run-make/issue-47551/Makefile

tests/run-make/interdependent-c-libraries/Makefile

-15
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// The rust crate foo will link to the native library foo, while the rust crate
2+
// bar will link to the native library bar. There is also a dependency between
3+
// the native library bar to the natibe library foo.
4+
// This test ensures that the ordering of -lfoo and -lbar on the command line is
5+
// correct to complete the linkage. If passed as "-lfoo -lbar", then the 'foo'
6+
// library will be stripped out, and the linkage will fail.
7+
// See https://github.com/rust-lang/rust/commit/e6072fa0c4c22d62acf3dcb78c8ee260a1368bd7
8+
9+
// FIXME(Oneirical): test-various
10+
11+
use run_make_support::{build_native_static_lib, rustc};
12+
13+
fn main() {
14+
build_native_static_lib("foo");
15+
build_native_static_lib("bar");
16+
rustc().input("foo.rs").run();
17+
rustc().input("bar.rs").run();
18+
rustc().input("main.rs").print("link-args").run();
19+
}

0 commit comments

Comments
 (0)