build

Macro rustc_link_search

source
macro_rules! rustc_link_search {
    ($($tokens:tt)*) => { ... };
}
Expand description

The rustc_link_search instruction tells Cargo to pass the -L flag to the compiler to add a directory to the library search path.

The optional KIND may be one of dependency, crate, native, framework, or all. See the rustc book for more detail.

These paths are also added to the dynamic library search path environment variable if they are within the OUT_DIR. Depending on this behavior is discouraged since this makes it difficult to use the resulting binary. In general, it is best to avoid creating dynamic libraries in a build script (using existing system libraries is fine).

For more information, see this cargo reference.