Skip to content

Commit

Permalink
Rollup merge of rust-lang#126015 - GuillaumeGomez:migrate-run-make-sy…
Browse files Browse the repository at this point in the history
…mlinked-rlib, r=jieyouxu

Migrate `run-make/symlinked-rlib` to `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`
  • Loading branch information
fmease authored Jun 6, 2024
2 parents 50297bb + 5772181 commit 7d2e75a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
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 @@ -235,7 +235,6 @@ run-make/symbol-visibility/Makefile
run-make/symbols-include-type-name/Makefile
run-make/symlinked-extern/Makefile
run-make/symlinked-libraries/Makefile
run-make/symlinked-rlib/Makefile
run-make/sysroot-crates-are-unstable/Makefile
run-make/target-cpu-native/Makefile
run-make/target-specs/Makefile
Expand Down
10 changes: 0 additions & 10 deletions tests/run-make/symlinked-rlib/Makefile

This file was deleted.

20 changes: 20 additions & 0 deletions tests/run-make/symlinked-rlib/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//@ ignore-cross-compile
// `ln` is actually `cp` on msys.
//@ ignore-windows

use run_make_support::{rustc, tmp_dir};
use std::process::Command;

fn main() {
let out = tmp_dir().join("foo.xxx");

rustc().input("foo.rs").crate_type("rlib").output(&out).run();
let output = Command::new("ln")
.arg("-nsf")
.arg(out)
.arg(tmp_dir().join("libfoo.rlib"))
.output()
.unwrap();
assert!(output.status.success());
rustc().input("bar.rs").library_search_path(tmp_dir()).run();
}

0 comments on commit 7d2e75a

Please sign in to comment.