rust/tests/run-make/symlinked-rlib/rmake.rs

18 lines
621 B
Rust
Raw Normal View History

2024-05-28 12:33:14 -05:00
// Rustc did not recognize libraries which were symlinked
// to files having extension other than .rlib. This was fixed
// in #32828. This test creates a symlink to "foo.xxx", which has
// an unusual file extension, and checks that rustc can successfully
// use it as an rlib library.
// See https://github.com/rust-lang/rust/pull/32828
//@ ignore-cross-compile
//@ needs-symlink
2024-05-28 12:33:14 -05:00
2024-07-17 08:31:38 -05:00
use run_make_support::{cwd, rfs, rustc};
2024-05-28 12:33:14 -05:00
fn main() {
2024-05-28 12:57:09 -05:00
rustc().input("foo.rs").crate_type("rlib").output("foo.xxx").run();
rfs::symlink_file("foo.xxx", "libfoo.rlib");
2024-05-28 12:57:09 -05:00
rustc().input("bar.rs").library_search_path(cwd()).run();
2024-05-28 12:33:14 -05:00
}