"llvm-readobj", // used to get information from ELFs/objects that the other tools don't provide
"llvm-size", // used to prints the size of the linker sections of a program
"llvm-strip", // used to discard symbols from binary files to reduce their size
+ "llvm-ar" // used for creating and modifying archive files
];
/// A structure representing a Rust compiler.
}
}
+ pub fn is_verbose_than(&self, level: usize) -> bool {
+ self.verbosity > level
+ }
+
+ /// Prints a message if this build is configured in more verbose mode than `level`.
+ fn verbose_than(&self, level: usize, msg: &str) {
+ if self.is_verbose_than(level) {
+ println!("{}", msg);
+ }
+ }
+
fn info(&self, msg: &str) {
if self.config.dry_run { return; }
println!("{}", msg);
.map(|p| &**p)
}
+ /// Returns the sysroot for the wasi target, if defined
+ fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
+ self.config.target_config.get(&target)
+ .and_then(|t| t.wasi_root.as_ref())
+ .map(|p| &**p)
+ }
+
/// Returns `true` if this is a no-std `target`, if defined
fn no_std(&self, target: Interned<String>) -> Option<bool> {
self.config.target_config.get(&target)
/// Copies a file from `src` to `dst`
pub fn copy(&self, src: &Path, dst: &Path) {
if self.config.dry_run { return; }
+ self.verbose_than(1, &format!("Copy {:?} to {:?}", src, dst));
let _ = fs::remove_file(&dst);
let metadata = t!(src.symlink_metadata());
if metadata.file_type().is_symlink() {