2024-09-16 01:48:47 -05:00
|
|
|
// Avoid erroring on symlinks pointing to the same file that are present in the library search path.
|
|
|
|
//
|
|
|
|
// See <https://github.com/rust-lang/rust/issues/12459>.
|
2024-05-28 12:57:09 -05:00
|
|
|
|
|
|
|
//@ ignore-cross-compile
|
2024-06-23 08:42:52 -05:00
|
|
|
//@ needs-symlink
|
2024-06-19 15:06:53 -05:00
|
|
|
|
2024-09-16 01:48:47 -05:00
|
|
|
use run_make_support::{cwd, dynamic_lib_name, path, rfs, rustc};
|
2024-05-28 12:57:09 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
rustc().input("foo.rs").arg("-Cprefer-dynamic").run();
|
2024-07-17 07:42:06 -05:00
|
|
|
rfs::create_dir_all("other");
|
2024-09-16 01:48:47 -05:00
|
|
|
rfs::symlink_file(dynamic_lib_name("foo"), path("other").join(dynamic_lib_name("foo")));
|
|
|
|
rustc().input("bar.rs").library_search_path(cwd()).library_search_path("other").run();
|
2024-05-28 12:57:09 -05:00
|
|
|
}
|