Skip to content

Commit 0f1ea63

Browse files
authored
Rollup merge of #128099 - lolbinarycat:extern-flag-disambiguates-rmake, r=Kobzol
migrate tests/run-make/extern-flag-disambiguates to rmake
2 parents 4290de8 + 62dff66 commit 0f1ea63

File tree

4 files changed

+35
-27
lines changed

4 files changed

+35
-27
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ run-make/dep-info-spaces/Makefile
1111
run-make/dep-info/Makefile
1212
run-make/emit-to-stdout/Makefile
1313
run-make/export-executable-symbols/Makefile
14-
run-make/extern-flag-disambiguates/Makefile
1514
run-make/extern-fn-reachable/Makefile
1615
run-make/fmt-write-bloat/Makefile
1716
run-make/foreign-double-unwind/Makefile

tests/run-make/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ The setup for the `rmake.rs` version is a 3-stage process:
4141

4242
[`run_make_support`]: ../../src/tools/run-make-support
4343
[extern_prelude]: https://doc.rust-lang.org/reference/names/preludes.html#extern-prelude
44+
45+
### Formatting
46+
47+
Note that files under `tests/` are not formatted by `./x fmt`,
48+
use `rustfmt tests/path/to/file.rs` to format a specific file if desired.

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

-26
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//@ ignore-cross-compile
2+
3+
use run_make_support::{cwd, run, 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+
// original Makefile at https://github.com/rust-lang/rust/issues/14469
18+
19+
fn main() {
20+
rustc().metadata("1").extra_filename("-1").input("a.rs").run();
21+
rustc().metadata("2").extra_filename("-2").input("a.rs").run();
22+
rustc().input("b.rs").extern_("a", "liba-1.rlib").run();
23+
rustc().input("c.rs").extern_("a", "liba-2.rlib").run();
24+
println!("before");
25+
rustc().cfg("before").input("d.rs").extern_("a", "liba-1.rlib").run();
26+
run("d");
27+
println!("after");
28+
rustc().cfg("after").input("d.rs").extern_("a", "liba-1.rlib").run();
29+
run("d");
30+
}

0 commit comments

Comments
 (0)