Rewrite simple-rlib to rmake
This commit is contained in:
parent
634270e8da
commit
cc97376ade
@ -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
|
||||
|
@ -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
|
||||
@ -9,7 +10,7 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
all:
|
||||
$(RUSTC) bar.rs --crate-type=rlib
|
||||
$(RUSTC) foo.rs
|
||||
$(call RUN,foo)
|
@ -1 +0,0 @@
|
||||
pub fn bar() {}
|
@ -1,5 +0,0 @@
|
||||
extern crate bar;
|
||||
|
||||
fn main() {
|
||||
bar::bar();
|
||||
}
|
2
tests/ui/imports/auxiliary/simple-rlib.rs
Normal file
2
tests/ui/imports/auxiliary/simple-rlib.rs
Normal file
@ -0,0 +1,2 @@
|
||||
#![crate_type = "rlib"]
|
||||
pub fn bar() {}
|
12
tests/ui/imports/simple-rlib-import.rs
Normal file
12
tests/ui/imports/simple-rlib-import.rs
Normal file
@ -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=simple-rlib.rs
|
||||
//@ run-pass
|
||||
|
||||
extern crate bar;
|
||||
|
||||
fn main() {
|
||||
bar::bar();
|
||||
}
|
Loading…
Reference in New Issue
Block a user