Skip to content

Commit b167a15

Browse files
committed
rewrite rmeta-preferred to rmake
1 parent 5e23dfe commit b167a15

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ run-make/return-non-c-like-enum-from-c/Makefile
132132
run-make/rlib-format-packed-bundled-libs-2/Makefile
133133
run-make/rlib-format-packed-bundled-libs-3/Makefile
134134
run-make/rlib-format-packed-bundled-libs/Makefile
135-
run-make/rmeta-preferred/Makefile
136135
run-make/rustc-macro-dep-files/Makefile
137136
run-make/sanitizer-cdylib-link/Makefile
138137
run-make/sanitizer-dylib-link/Makefile

tests/run-make/include-bytes-deps/rmake.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// and this test checks that this is still the case.
44
// See https://github.com/rust-lang/rust/pull/24423
55

6-
//FIXME(Oneirical): check if works without ignore freebsd
7-
86
use run_make_support::{invalid_utf8_contains, rustc};
97

108
fn main() {

tests/run-make/metadata-only-crate-no-ice/rmake.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ use run_make_support::rustc;
99
fn main() {
1010
rustc().input("baz.rs").emit("metadata").run();
1111
rustc().input("bar.rs").emit("metadata").extern_("baz", "libbaz.rmeta").run();
12-
// There should be no internal compiler error message.
13-
rustc().input("foo.rs").emit("metadata").extern_("bar", "libbaz.rmeta").run().assert_stderr_not_contains("unexpectedly panicked");
12+
// There should be no internal compiler error.
13+
rustc().input("foo.rs").emit("metadata").extern_("bar", "libbaz.rmeta").run();
1414
}

tests/run-make/rmeta-preferred/Makefile

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This test compiles `lib.rs`'s dependency, `rmeta_aux.rs`, as both an rlib
2+
// and an rmeta crate. By default, rustc should give the metadata crate (rmeta)
3+
// precedence over the rust-lib (rlib). This test inspects the contents of the binary
4+
// and that the correct (rmeta) crate was used.
5+
// rlibs being preferred could indicate a resurgence of the -Zbinary-dep-depinfo bug
6+
// seen in #68298.
7+
// See https://github.com/rust-lang/rust/pull/37681
8+
9+
//@ ignore-cross-compile
10+
11+
use run_make_support::{invalid_utf8_contains, invalid_utf8_not_contains, rustc};
12+
13+
fn main() {
14+
rustc().input("rmeta_aux.rs").crate_type("rlib").emit("link,metadata").run();
15+
rustc().input("lib.rs").crate_type("rlib").emit("dep-info").arg("-Zbinary-dep-depinfo").run();
16+
invalid_utf8_contains("lib.d", "librmeta_aux.rmeta");
17+
invalid_utf8_not_contains("lib.d", "librmeta_aux.rlib");
18+
}

0 commit comments

Comments
 (0)