Skip to content

Commit

Permalink
Rollup merge of #125886 - GuillaumeGomez:migrate-run-make-issue-15460…
Browse files Browse the repository at this point in the history
…, r=jieyouxu

Migrate run make issue 15460

Part of #121876.

r? `@jieyouxu`

try-job: x86_64-msvc
try-job: aarch64-apple
try-job: x86_64-gnu-llvm-18
  • Loading branch information
matthiaskrgr authored Jul 23, 2024
2 parents 84c257e + 3de5252 commit 9d4daf8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3378,6 +3378,7 @@ impl<'test> TestCx<'test> {
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 {
Expand Down Expand Up @@ -3748,6 +3749,7 @@ impl<'test> TestCx<'test> {
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)
Expand Down
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions tests/run-make/issue-15460/Makefile

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions tests/run-make/link-native-static-lib-to-dylib/rmake.rs
Original file line number Diff line number Diff line change
@@ -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");
}

0 comments on commit 9d4daf8

Please sign in to comment.