rewrite extern-flag-rename-transitive to rmake

This commit is contained in:
Oneirical 2024-06-18 15:59:33 -04:00
parent dd104ef163
commit 060a13e9fd
3 changed files with 14 additions and 8 deletions

View File

@ -40,7 +40,6 @@ run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile run-make/extern-flag-disambiguates/Makefile
run-make/extern-flag-pathless/Makefile run-make/extern-flag-pathless/Makefile
run-make/extern-flag-rename-transitive/Makefile
run-make/extern-fn-explicit-align/Makefile run-make/extern-fn-explicit-align/Makefile
run-make/extern-fn-generic/Makefile run-make/extern-fn-generic/Makefile
run-make/extern-fn-mangle/Makefile run-make/extern-fn-mangle/Makefile

View File

@ -1,7 +0,0 @@
include ../tools.mk
all:
$(RUSTC) foo.rs
$(RUSTC) bar.rs
$(RUSTC) baz.rs --extern a=$(TMPDIR)/libfoo.rlib

View File

@ -0,0 +1,14 @@
// In this test, baz.rs is looking for an extern crate "a" which
// does not exist, and can only run through the --extern rustc flag
// defining that the "a" crate is in fact just "foo". This test
// checks that the --extern flag takes precedence over the extern
// crate statement in the code.
// See https://github.com/rust-lang/rust/pull/52723
use run_make_support::{rust_lib_name, rustc};
fn main() {
rustc().input("foo.rs").run();
rustc().input("bar.rs").run();
rustc().input("baz.rs").extern_("a", rust_lib_name("foo")).run();
}