Skip to content

Commit 8490189

Browse files
committed
rewrite interdependent-c-libraries to rmake
1 parent 0cd01aa commit 8490189

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
@@ -33,7 +33,6 @@ run-make/foreign-exceptions/Makefile
3333
run-make/foreign-rust-exceptions/Makefile
3434
run-make/incr-add-rust-src-component/Makefile
3535
run-make/incr-foreign-head-span/Makefile
36-
run-make/interdependent-c-libraries/Makefile
3736
run-make/issue-107094/Makefile
3837
run-make/issue-14698/Makefile
3938
run-make/issue-15460/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)