Expand description
Various utility functions used throughout bootstrap.
Simple things like testing the various filesystem operations here and there, not a lot of interesting happenings here unfortunately.
Re-exports§
pub use crate::utils::shared_helpers::dylib_path;
pub use crate::utils::shared_helpers::dylib_path_var;
pub use t;
Structs§
Enums§
Functions§
- Adds a list of lookup paths to
cmd
’s dynamic library lookup path. If the dylib_path_var is already set for this cmd, the old value will be overwritten! - Adds a list of lookup paths to
cmd
’s link library lookup path. - Create a
--check-cfg
argument invocation for a given name and it’s values. - Extract the beta revision from the full version string.
- Prepares
BootstrapCommand
that runs git inside the source directory if given. - Converts
T
into a hexadecimalString
. - Returns
true
if the file name given looks like a debug info file - Returns
true
if the file name given looks like a dynamic library. - Returns the corresponding relative library directory that the compiler’s dylibs will be found in.
- Parses the
link_lib_path_var()
environment variable, returning a list of paths that are members of this lookup path. - Returns the environment variable which the link library lookup path resides in for this platform.
- Returns the linker arguments for rustc/rustdoc for the given builder and target.
- Returns the linker arguments for rustc/rustdoc for the given builder and target, without the -Clinker flag.
- Returns a flag that configures LLD to use only a single thread. If we use an external LLD, we need to find out which version is it to know which flag should we pass to it (LLD older than version 10 had a different flag).
- Rename a file if from and to are in the same filesystem or copy and remove the file otherwise
- Returns the last-modified time for
path
, or zero if it doesn’t exist. - Used for download caching
- Sets the file times for a given file at
path
. - Symlinks two directories, using junctions on Windows and normal symlinks on Unix.
- Returns an RAII structure that prints out how long it took to drop.
- Returns the filename without the hash prefix added by the cc crate.
- Returns
true
ifdst
is up to date given that the file or files insrc
are used to generate it.