about summary refs log tree commit diff
path: root/tests/run-make/symlinked-libraries/rmake.rs
blob: 98f156fed8f9e0aa4047a9c22ebf826bd7c1ac52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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>.

//@ ignore-cross-compile
//@ needs-symlink

use run_make_support::{cwd, dynamic_lib_name, path, rfs, rustc};

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();
}