Expand description
A module for searching for libraries
Re-exportsΒ§
use std::path::Path;πuse std::path::PathBuf;πuse std::sync::Arc;πuse std::env;πuse std::env;πuse std::fs;πuse std::iter;πuse rustc_fs_util::try_canonicalize;πuse rustc_target::spec::Target;πuse crate::search_paths::PathKind;πuse crate::search_paths::SearchPath;π
StructsΒ§
- File
Search - File
Search πCandidate - This type stores
Box<str>instead ofPathBuffor the filename, because getting thefile_nameof aPathBufallocates, which is unnecessary. We have to go through the files a lot of times, so storing file name and the directory separately saves time and memory.
FunctionsΒ§
- current_
dll_ πpath - default_
sysroot π - This function checks if sysroot is found using env::args().next(), and if it is not found, finds sysroot from current rustc_driver dll.
- dll_
path β - Attempts to find the path to the dynamic library containing a function.
- make_
target_ bin_ path - Returns a path to the targetβs
binfolder within itsrustlibpath in the sysroot. This is where binaries are usually installed, e.g. the self-contained linkers, lld-wrappers, LLVM tools, etc. - make_
target_ lib_ path