Rollup merge of #125886 - GuillaumeGomez:migrate-run-make-issue-15460, r=jieyouxu
Migrate run make issue 15460 Part of https://github.com/rust-lang/rust/issues/121876. r? `@jieyouxu` try-job: x86_64-msvc try-job: aarch64-apple try-job: x86_64-gnu-llvm-18
This commit is contained in:
commit
9d4daf8869
@ -3378,6 +3378,7 @@ fn run_rmake_legacy_test(&self) {
|
||||
cmd.env("IS_MSVC", "1")
|
||||
.env("IS_WINDOWS", "1")
|
||||
.env("MSVC_LIB", format!("'{}' -nologo", lib.display()))
|
||||
.env("MSVC_LIB_PATH", format!("{}", lib.display()))
|
||||
.env("CC", format!("'{}' {}", self.config.cc, cflags))
|
||||
.env("CXX", format!("'{}' {}", &self.config.cxx, cxxflags));
|
||||
} else {
|
||||
@ -3748,6 +3749,7 @@ fn run_rmake_v2_test(&self) {
|
||||
cmd.env("IS_MSVC", "1")
|
||||
.env("IS_WINDOWS", "1")
|
||||
.env("MSVC_LIB", format!("'{}' -nologo", lib.display()))
|
||||
.env("MSVC_LIB_PATH", format!("{}", lib.display()))
|
||||
// Note: we diverge from legacy run_make and don't lump `CC` the compiler and
|
||||
// default flags together.
|
||||
.env("CC_DEFAULT_FLAGS", &cflags)
|
||||
|
@ -27,7 +27,6 @@ run-make/foreign-rust-exceptions/Makefile
|
||||
run-make/incr-add-rust-src-component/Makefile
|
||||
run-make/incr-foreign-head-span/Makefile
|
||||
run-make/interdependent-c-libraries/Makefile
|
||||
run-make/issue-15460/Makefile
|
||||
run-make/issue-35164/Makefile
|
||||
run-make/issue-36710/Makefile
|
||||
run-make/issue-47551/Makefile
|
||||
|
@ -1,7 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
all: $(call NATIVE_STATICLIB,foo)
|
||||
$(RUSTC) foo.rs -C extra-filename=-383hf8 -C prefer-dynamic
|
||||
$(RUSTC) bar.rs
|
||||
$(call RUN,bar)
|
14
tests/run-make/link-native-static-lib-to-dylib/rmake.rs
Normal file
14
tests/run-make/link-native-static-lib-to-dylib/rmake.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Regression test for <https://github.com/rust-lang/rust/issues/15460>.
|
||||
|
||||
//@ ignore-cross-compile
|
||||
|
||||
use run_make_support::{build_native_static_lib, run, rustc};
|
||||
|
||||
fn main() {
|
||||
build_native_static_lib("foo");
|
||||
|
||||
rustc().input("foo.rs").extra_filename("-383hf8").arg("-Cprefer-dynamic").run();
|
||||
rustc().input("bar.rs").run();
|
||||
|
||||
run("bar");
|
||||
}
|
Loading…
Reference in New Issue
Block a user