Skip to content

Commit 596fd33

Browse files
committed
migrate tests/run-make/extern-flag-disambiguates to rmake
1 parent 08cdc2f commit 596fd33

File tree

2 files changed

+30
-26
lines changed

2 files changed

+30
-26
lines changed

tests/run-make/extern-flag-disambiguates/Makefile

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//@ ignore-cross-compile
2+
3+
use run_make_support::{cwd, run, run_in_tmpdir, rustc};
4+
5+
// Attempt to build this dependency tree:
6+
//
7+
// A.1 A.2
8+
// |\ |
9+
// | \ |
10+
// B \ C
11+
// \ | /
12+
// \|/
13+
// D
14+
//
15+
// Note that A.1 and A.2 are crates with the same name.
16+
17+
fn main() {
18+
run_in_tmpdir(|| {
19+
rustc().metadata("1").extra_filename("-1").input("a.rs").run();
20+
rustc().metadata("2").extra_filename("-2").input("a.rs").run();
21+
rustc().input("b.rs").extern_("a", "liba-1.rlib").run();
22+
rustc().input("c.rs").extern_("a", "liba-2.rlib").run();
23+
println!("before");
24+
rustc().cfg("before").input("d.rs").extern_("a", "liba-1.rlib").run();
25+
run("d");
26+
println!("after");
27+
rustc().cfg("after").input("d.rs").extern_("a", "liba-1.rlib").run();
28+
run("d");
29+
});
30+
}

0 commit comments

Comments
 (0)