Skip to content

Commit 4332f5d

Browse files
committed
rewrite extern-multiple-copies to rmake
1 parent da692ee commit 4332f5d

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ run-make/emit-to-stdout/Makefile
1717
run-make/export-executable-symbols/Makefile
1818
run-make/extern-flag-disambiguates/Makefile
1919
run-make/extern-fn-reachable/Makefile
20-
run-make/extern-multiple-copies/Makefile
2120
run-make/extern-multiple-copies2/Makefile
2221
run-make/fmt-write-bloat/Makefile
2322
run-make/foreign-double-unwind/Makefile

tests/run-make/extern-multiple-copies/Makefile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// In this test, the rust library foo1 exists in two different locations, but only one
2+
// is required by the --extern flag. This test checks that the copy is ignored (as --extern
3+
// demands fetching only the original instance of foo1) and that no error is emitted, resulting
4+
// in successful compilation.
5+
// https://github.com/rust-lang/rust/pull/29961
6+
7+
// FIXME(Oneirical): test-various
8+
9+
use run_make_support::{path, rfs, rust_lib_name, rustc};
10+
11+
fn main() {
12+
rustc().input("foo1.rs").run();
13+
rustc().input("foo2.rs").run();
14+
rfs::create_dir("foo");
15+
rfs::copy(rust_lib_name("foo1"), path("foo").join(rust_lib_name("foo1")));
16+
rustc().input("bar.rs").extern_("foo1", rust_lib_name("foo1")).library_search_path("foo").run();
17+
}

0 commit comments

Comments
 (0)