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
|
2024-06-23 08:42:52 -05:00
|
|
|
//@ 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();
|
2024-09-16 01:48:47 -05:00
|
|
|
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
|
|
|
}
|