Skip to content

Commit

Permalink
Rewrite simple-rlib to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed May 28, 2024
1 parent 634270e commit 4e0d133
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ run-make/short-ice/Makefile
run-make/silly-file-names/Makefile
run-make/simd-ffi/Makefile
run-make/simple-dylib/Makefile
run-make/simple-rlib/Makefile
run-make/split-debuginfo/Makefile
run-make/stable-symbol-names/Makefile
run-make/static-dylib-by-default/Makefile
Expand Down
7 changes: 4 additions & 3 deletions tests/run-make/lto-smoke/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// A simple smoke test to check that link time optimization
// (LTO) works as intended, with its various flags turned on.
// (LTO) is accepted by the compiler, and that
// passing its various flags still results in successful compilation.
// See https://github.com/rust-lang/rust/issues/10741

//@ ignore-cross-compile
Expand All @@ -9,7 +10,7 @@ use run_make_support::rustc;
fn main() {
let lto_flags = ["-Clto", "-Clto=yes", "-Clto=off", "-Clto=thin", "-Clto=fat"];
for flag in lto_flags {
rustc().input(lib.rs).run();
rustc().input(main.rs).arg(flag).run();
rustc().input("lib.rs").run();
rustc().input("main.rs").arg(flag).run();
}
}
File renamed without changes.
6 changes: 0 additions & 6 deletions tests/run-make/simple-rlib/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion tests/run-make/simple-rlib/bar.rs

This file was deleted.

5 changes: 0 additions & 5 deletions tests/run-make/simple-rlib/foo.rs

This file was deleted.

2 changes: 2 additions & 0 deletions tests/ui/imports/auxiliary/bar.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#![crate_type = "rlib"]
pub fn bar() {}
12 changes: 12 additions & 0 deletions tests/ui/imports/foo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// A simple test, where foo.rs has a dependency
// on the rlib (a static Rust-specific library format) bar.rs. If the test passes,
// rlibs can be built and linked into another file successfully..

//@ aux-crate: bar.rs
//@ run-pass

extern crate bar;

fn main() {
bar::bar();
}

0 comments on commit 4e0d133

Please sign in to comment.