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§
- add_
dylib_ path - 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! - add_
rustdoc_ cargo_ linker_ args - check_
cfg_ arg - Create a
--check-cfg
argument invocation for a given name and it’s values. - check_
run - dir_
is_ empty - dir_
up_ 🔒to_ date - exe
- extract_
beta_ rev - Extract the beta revision from the full version string.
- forcing_
clang_ based_ tests - get_
clang_ cl_ resource_ dir - Adapted from https://github.com/llvm/llvm-project/blob/782e91224601e461c019e0a4573bbccc6094fbcd/llvm/cmake/modules/HandleLLVMOptions.cmake#L1058-L1079
- git
- Prepares
BootstrapCommand
that runs git inside the source directory if given. - hex_
encode - Converts
T
into a hexadecimalString
. - is_
aix_ 🔒shared_ archive - is_
debug_ info - Returns
true
if the file name given looks like a debug info file - is_
dylib - Returns
true
if the file name given looks like a dynamic library. - is_
valid_ test_ suite_ arg - libdir
- Returns the corresponding relative library directory that the compiler’s dylibs will be found in.
- linker_
args - Returns the linker arguments for rustc/rustdoc for the given builder and target.
- linker_
flags - Returns the linker arguments for rustc/rustdoc for the given builder and target, without the -Clinker flag.
- lld_
flag_ 🔒no_ threads - 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).
- make
- move_
file - Rename a file if from and to are in the same filesystem or copy and remove the file otherwise
- mtime
- Returns the last-modified time for
path
, or zero if it doesn’t exist. - output
- set_
file_ times - Sets the file times for a given file at
path
. - split_
debuginfo - Returns the path to the split debug info for the specified file if it exists.
- start_
process - Spawn a process and return a closure that will wait for the process to finish and then return its output. This allows the spawned process to do work without immediately blocking bootstrap.
- submodule_
path_ of - Return the path to the containing submodule if available.
- symlink_
dir - Symlinks two directories, using junctions on Windows and normal symlinks on Unix.
- target_
supports_ cranelift_ backend - timeit
- Returns an RAII structure that prints out how long it took to drop.
- unhashed_
basename - Returns the filename without the hash prefix added by the cc crate.
- up_
to_ date - Returns
true
ifdst
is up to date given that the file or files insrc
are used to generate it. - use_
host_ linker