Skip to content

Commit

Permalink
rewrite interdependent-c-libraries to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 22, 2024
1 parent aee3dc4 commit 67b8e48
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ run-make/foreign-exceptions/Makefile
run-make/foreign-rust-exceptions/Makefile
run-make/incr-add-rust-src-component/Makefile
run-make/incr-foreign-head-span/Makefile
run-make/interdependent-c-libraries/Makefile
run-make/issue-107094/Makefile
run-make/issue-14698/Makefile
run-make/issue-15460/Makefile
Expand Down
15 changes: 0 additions & 15 deletions tests/run-make/interdependent-c-libraries/Makefile

This file was deleted.

19 changes: 19 additions & 0 deletions tests/run-make/interdependent-c-libraries/rmake.rs
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();
}

0 comments on commit 67b8e48

Please sign in to comment.