Skip to content

Commit 24ec73d

Browse files
committed
Fix cross-compiling macos-deployment-target-warning test
`cc()` gets target flags, which won't match with the host triple used by `bare_rustc()`.
1 parent 4933094 commit 24ec73d

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

  • tests/run-make/macos-deployment-target-warning

tests/run-make/macos-deployment-target-warning/rmake.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
//@ only-apple
21
//! Tests that deployment target linker warnings are shown as `linker-info`, not `linker-messages`
32
3+
//@ only-macos
4+
45
use run_make_support::external_deps::c_cxx_compiler::cc;
56
use run_make_support::external_deps::llvm::llvm_ar;
6-
use run_make_support::{bare_rustc, diff};
7+
use run_make_support::{rustc, diff};
78

89
fn main() {
9-
let cwd = std::env::current_dir().unwrap().to_str().unwrap().to_owned();
10-
1110
cc().arg("-c").arg("-mmacosx-version-min=15.5").output("foo.o").input("foo.c").run();
1211
llvm_ar().obj_to_ar().output_input("libfoo.a", "foo.o").run();
1312

14-
let warnings = bare_rustc()
15-
.arg("-L")
16-
.arg(format!("native={cwd}"))
13+
let warnings = rustc()
1714
.arg("-lstatic=foo")
1815
.link_arg("-mmacosx-version-min=11.2")
1916
.input("main.rs")

0 commit comments

Comments
 (0)