Skip to content

Commit cc97376

Browse files
committed
Rewrite simple-rlib to rmake
1 parent 634270e commit cc97376

File tree

8 files changed

+18
-16
lines changed

8 files changed

+18
-16
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ run-make/short-ice/Makefile
237237
run-make/silly-file-names/Makefile
238238
run-make/simd-ffi/Makefile
239239
run-make/simple-dylib/Makefile
240-
run-make/simple-rlib/Makefile
241240
run-make/split-debuginfo/Makefile
242241
run-make/stable-symbol-names/Makefile
243242
run-make/static-dylib-by-default/Makefile

tests/run-make/lto-smoke/rmake.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// A simple smoke test to check that link time optimization
2-
// (LTO) works as intended, with its various flags turned on.
2+
// (LTO) is accepted by the compiler, and that
3+
// passing its various flags still results in successful compilation.
34
// See https://github.com/rust-lang/rust/issues/10741
45

56
//@ ignore-cross-compile
@@ -9,7 +10,7 @@ use run_make_support::rustc;
910
fn main() {
1011
let lto_flags = ["-Clto", "-Clto=yes", "-Clto=off", "-Clto=thin", "-Clto=fat"];
1112
for flag in lto_flags {
12-
rustc().input(lib.rs).run();
13-
rustc().input(main.rs).arg(flag).run();
13+
rustc().input("lib.rs").run();
14+
rustc().input("main.rs").arg(flag).run();
1415
}
1516
}
File renamed without changes.

tests/run-make/simple-rlib/Makefile

-6
This file was deleted.

tests/run-make/simple-rlib/bar.rs

-1
This file was deleted.

tests/run-make/simple-rlib/foo.rs

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#![crate_type = "rlib"]
2+
pub fn bar() {}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// A simple test, where foo.rs has a dependency
2+
// on the rlib (a static Rust-specific library format) bar.rs. If the test passes,
3+
// rlibs can be built and linked into another file successfully..
4+
5+
//@ aux-crate:bar=simple-rlib.rs
6+
//@ run-pass
7+
8+
extern crate bar;
9+
10+
fn main() {
11+
bar::bar();
12+
}

0 commit comments

Comments
 (0)