rewrite no-duplicate-libs to rmake
This commit is contained in:
parent
632f01306b
commit
f307287659
@ -53,7 +53,6 @@ run-make/native-link-modifier-bundle/Makefile
|
||||
run-make/native-link-modifier-whole-archive/Makefile
|
||||
run-make/no-alloc-shim/Makefile
|
||||
run-make/no-builtins-attribute/Makefile
|
||||
run-make/no-duplicate-libs/Makefile
|
||||
run-make/panic-abort-eh_frame/Makefile
|
||||
run-make/pdb-buildinfo-cl-cmd/Makefile
|
||||
run-make/pgo-gen-lto/Makefile
|
||||
|
@ -1,11 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
ifdef IS_MSVC
|
||||
# FIXME(#27979)
|
||||
all:
|
||||
else
|
||||
all: $(call STATICLIB,foo) $(call STATICLIB,bar)
|
||||
$(RUSTC) main.rs
|
||||
$(call RUN,main)
|
||||
endif
|
21
tests/run-make/no-duplicate-libs/rmake.rs
Normal file
21
tests/run-make/no-duplicate-libs/rmake.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// The rust compiler used to try to detect duplicated libraries in
|
||||
// the linking order and remove the duplicates... but certain edge cases,
|
||||
// such as the one presented in `foo` and `bar` in this test, demand precise
|
||||
// control over the link order, including duplicates. As the anti-duplication
|
||||
// filter was removed, this test should now successfully see main be compiled
|
||||
// and executed.
|
||||
// See https://github.com/rust-lang/rust/pull/12688
|
||||
|
||||
//@ ignore-cross-compile
|
||||
// Reason: the compiled binary is executed
|
||||
|
||||
// FIXME(Oneirical): try on msvc because of #27979
|
||||
|
||||
use run_make_support::{build_native_static_lib, run, rustc};
|
||||
|
||||
fn main() {
|
||||
build_native_static_lib("foo");
|
||||
build_native_static_lib("bar");
|
||||
rustc().input("main.rs").run();
|
||||
run("main");
|
||||
}
|
Loading…
Reference in New Issue
Block a user