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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
563 B
Rust
Raw Normal View History

// 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
//@ needs-symlink
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();
rfs::create_dir_all("other");
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
}