[][src]Macro cargo_emit::rustc_link_search

macro_rules! rustc_link_search {
    ($path:literal $(,)?) => { ... };
    ($path:expr $(,)?) => { ... };
    ($path:literal => $kind:literal $(,)?) => { ... };
    ($path:expr => $kind:expr $(,)?) => { ... };
    ($($path:expr $(=> $kind:expr)?),+ $(,)?) => { ... };
}

Tells Cargo to pass $path to the compiler as a -L flag.

This is equivalent to:

println!("cargo:rustc-link-search=[$kind=]$path");

Examples

Useful for telling the linker where a library can be found.

cargo_emit::rustc_link_search!(
    "path/to/ssl/lib/", // same as `=> "all"`
    "path/to/ruby/lib/" => "native",
);