rewrite manual-link to rmake
This commit is contained in:
parent
06dcdbb2ee
commit
aeca91e08d
@ -72,7 +72,6 @@ run-make/lto-linkage-used-attr/Makefile
|
||||
run-make/lto-no-link-whole-rlib/Makefile
|
||||
run-make/lto-smoke-c/Makefile
|
||||
run-make/macos-deployment-target/Makefile
|
||||
run-make/manual-link/Makefile
|
||||
run-make/min-global-align/Makefile
|
||||
run-make/missing-crate-dependency/Makefile
|
||||
run-make/native-link-modifier-bundle/Makefile
|
||||
|
@ -1,7 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
all: $(TMPDIR)/libbar.a
|
||||
$(RUSTC) foo.rs -lstatic=bar
|
||||
$(RUSTC) main.rs
|
||||
$(call RUN,main)
|
16
tests/run-make/manual-link/rmake.rs
Normal file
16
tests/run-make/manual-link/rmake.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// A smoke test for the `-l` command line rustc flag, which manually links to the selected
|
||||
// library. Useful for native libraries, this is roughly equivalent to `#[link]` in Rust code.
|
||||
// If compilation succeeds, the flag successfully linked the native library.
|
||||
// See https://github.com/rust-lang/rust/pull/18470
|
||||
|
||||
//@ ignore-cross-compile
|
||||
// Reason: the compiled binary is executed
|
||||
|
||||
use run_make_support::{build_native_static_lib, run, rustc};
|
||||
|
||||
fn main() {
|
||||
build_native_static_lib("bar");
|
||||
rustc().input("foo.rs").arg("-lstatic=bar").run();
|
||||
rustc().input("main.rs").run();
|
||||
run("main");
|
||||
}
|
Loading…
Reference in New Issue
Block a user