mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 05:56:56 +00:00
rewrite std-core-cycle to rmake
This commit is contained in:
parent
59a4f02f83
commit
cf9e7a975d
@ -142,7 +142,6 @@ run-make/static-dylib-by-default/Makefile
|
||||
run-make/static-extern-type/Makefile
|
||||
run-make/staticlib-blank-lib/Makefile
|
||||
run-make/staticlib-dylib-linkage/Makefile
|
||||
run-make/std-core-cycle/Makefile
|
||||
run-make/symbol-mangling-hashed/Makefile
|
||||
run-make/symbol-visibility/Makefile
|
||||
run-make/symbols-include-type-name/Makefile
|
||||
|
@ -1,17 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
ifeq ($(UNAME),Darwin)
|
||||
FLAGS :=
|
||||
else
|
||||
ifdef IS_WINDOWS
|
||||
FLAGS :=
|
||||
else
|
||||
FLAGS := -C link-args=-Wl,--no-undefined
|
||||
endif
|
||||
endif
|
||||
|
||||
all:
|
||||
$(RUSTC) bar.rs
|
||||
$(RUSTC) foo.rs $(FLAGS)
|
||||
$(RUSTC) foo.rs $(FLAGS) -C panic=abort
|
28
tests/run-make/std-core-cycle/rmake.rs
Normal file
28
tests/run-make/std-core-cycle/rmake.rs
Normal file
@ -0,0 +1,28 @@
|
||||
// In some cases, linking libraries with GNU used to fail due to how
|
||||
// `std` and `core` possess a circular dependency with one another, and
|
||||
// how the linker could not go back through its symbol processing to resolve
|
||||
// the circular link. #49316 fixed this, and this test reproduces a minimal
|
||||
// version of one such linking attempt which used to fail.
|
||||
// See https://github.com/rust-lang/rust/issues/18807
|
||||
|
||||
//@ ignore-cross-compile
|
||||
|
||||
use run_make_support::{is_darwin, is_windows, rustc};
|
||||
|
||||
fn main() {
|
||||
rustc().input("bar.rs").run();
|
||||
|
||||
let mut rustc_foo = rustc();
|
||||
rustc_foo.input("foo.rs");
|
||||
let mut rustc_foo_panic = rustc();
|
||||
rustc_foo_panic.input("foo.rs").panic("abort");
|
||||
|
||||
if !is_darwin() && !is_windows() {
|
||||
rustc_foo.arg("-Clink-args=-Wl,--no-undefined");
|
||||
rustc_foo_panic.arg("-Clink-args=-Wl,--no-undefined");
|
||||
}
|
||||
|
||||
rustc_foo.run();
|
||||
rustc_foo_panic.run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user