remove unneeded extern crates from build tools

This commit is contained in:
Andy Russell 2019-05-09 12:03:13 -04:00
parent e6305805a7
commit b2f71fb540
No known key found for this signature in database
GPG key ID: BE2221033EDBC374
28 changed files with 81 additions and 75 deletions

View file

@ -42,11 +42,10 @@ num_cpus = "1.0"
getopts = "0.2.19"
cc = "1.0.35"
libc = "0.2"
serde = "1.0.8"
serde_derive = "1.0.8"
serde = { version = "1.0.8", features = ["derive"] }
serde_json = "1.0.2"
toml = "0.4"
lazy_static = "0.2"
lazy_static = "1.3.0"
time = "0.1"
petgraph = "0.4.13"

View file

@ -11,6 +11,8 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{Duration, Instant};
use build_helper::t;
use crate::cache::{Cache, Interned, INTERNER};
use crate::check;
use crate::compile;
@ -1308,6 +1310,8 @@ mod __test {
use crate::config::Config;
use std::thread;
use pretty_assertions::assert_eq;
fn configure(host: &[&str], target: &[&str]) -> Config {
let mut config = Config::default_opts();
// don't save toolstates

View file

@ -13,6 +13,8 @@ use std::path::{Path, PathBuf};
use std::sync::Mutex;
use std::cmp::{PartialOrd, Ord, Ordering};
use lazy_static::lazy_static;
use crate::builder::Step;
pub struct Interned<T>(usize, PhantomData<*const T>);

View file

@ -9,6 +9,8 @@ use std::fs;
use std::io::{self, ErrorKind};
use std::path::Path;
use build_helper::t;
use crate::Build;
pub fn clean(build: &Build, all: bool) {

View file

@ -15,8 +15,9 @@ use std::path::{Path, PathBuf};
use std::process::{Command, Stdio, exit};
use std::str;
use build_helper::{output, mtime, up_to_date};
use build_helper::{output, mtime, t, up_to_date};
use filetime::FileTime;
use serde::Deserialize;
use serde_json;
use crate::dist;

View file

@ -10,8 +10,10 @@ use std::path::{Path, PathBuf};
use std::process;
use std::cmp;
use build_helper::t;
use num_cpus;
use toml;
use serde::Deserialize;
use crate::cache::{INTERNER, Interned};
use crate::flags::Flags;
pub use crate::flags::Subcommand;

View file

@ -14,7 +14,7 @@ use std::io::Write;
use std::path::{PathBuf, Path};
use std::process::{Command, Stdio};
use build_helper::output;
use build_helper::{output, t};
use crate::{Compiler, Mode, LLVM_TOOLS};
use crate::channel;

View file

@ -13,7 +13,7 @@ use std::io;
use std::path::{PathBuf, Path};
use crate::Mode;
use build_helper::up_to_date;
use build_helper::{t, up_to_date};
use crate::util::symlink_dir;
use crate::builder::{Builder, Compiler, RunConfig, ShouldRun, Step};

View file

@ -8,6 +8,8 @@ use std::fs;
use std::path::{Path, PathBuf, Component};
use std::process::Command;
use build_helper::t;
use crate::dist::{self, pkgname, sanitize_sh, tmpdir};
use crate::builder::{Builder, RunConfig, ShouldRun, Step};

View file

@ -108,17 +108,6 @@
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#[macro_use]
extern crate build_helper;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate lazy_static;
#[cfg(test)]
#[macro_use]
extern crate pretty_assertions;
use std::cell::{RefCell, Cell};
use std::collections::{HashSet, HashMap};
use std::env;
@ -134,7 +123,9 @@ use std::os::unix::fs::symlink as symlink_file;
#[cfg(windows)]
use std::os::windows::fs::symlink_file;
use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime};
use build_helper::{
mtime, output, run_silent, run_suppressed, t, try_run_silent, try_run_suppressed,
};
use filetime::FileTime;
use crate::util::{exe, libdir, OutputFolder, CiEnv};

View file

@ -4,6 +4,7 @@ use std::path::PathBuf;
use std::collections::HashSet;
use build_helper::output;
use serde::Deserialize;
use serde_json;
use crate::{Build, Crate};

View file

@ -14,7 +14,7 @@ use std::fs::{self, File};
use std::path::{Path, PathBuf};
use std::process::Command;
use build_helper::output;
use build_helper::{output, t};
use cmake;
use cc;

View file

@ -15,7 +15,7 @@ use std::fs;
use std::path::PathBuf;
use std::process::Command;
use build_helper::output;
use build_helper::{output, t};
use crate::Build;

View file

@ -11,7 +11,7 @@ use std::iter;
use std::path::{Path, PathBuf};
use std::process::Command;
use build_helper::{self, output};
use build_helper::{self, output, t};
use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
use crate::cache::{Interned, INTERNER};

View file

@ -4,6 +4,8 @@ use std::path::PathBuf;
use std::process::{Command, exit};
use std::collections::HashSet;
use build_helper::t;
use crate::Mode;
use crate::Compiler;
use crate::builder::{Step, RunConfig, ShouldRun, Builder};

View file

@ -1,3 +1,5 @@
use serde::{Deserialize, Serialize};
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")]
/// Whether a tool can be compiled, tested or neither

View file

@ -11,6 +11,8 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{SystemTime, Instant};
use build_helper::t;
use crate::config::Config;
use crate::builder::Builder;

View file

@ -7,4 +7,3 @@ edition = "2018"
[dependencies]
toml = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"

View file

@ -11,9 +11,8 @@ filetime = "0.2"
getopts = "0.2"
log = "0.4"
regex = "1.0"
serde = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_derive = "1.0"
rustfix = "0.4.1"
lazy_static = "1.0"
walkdir = "2"

View file

@ -7,6 +7,8 @@ use std::io::BufReader;
use std::path::Path;
use std::str::FromStr;
use log::*;
#[derive(Clone, Debug, PartialEq)]
pub enum ErrorKind {
Help,

View file

@ -4,6 +4,8 @@ use std::io::prelude::*;
use std::io::BufReader;
use std::path::{Path, PathBuf};
use log::*;
use crate::common::{self, CompareMode, Config, Mode};
use crate::util;

View file

@ -3,6 +3,7 @@
use crate::errors::{Error, ErrorKind};
use crate::runtest::ProcRes;
use serde::Deserialize;
use serde_json;
use std::path::{Path, PathBuf};
use std::str::FromStr;

View file

@ -3,14 +3,6 @@
#![feature(vec_remove_item)]
#![deny(warnings, rust_2018_idioms)]
#[cfg(unix)]
extern crate libc;
#[macro_use]
extern crate log;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate serde_derive;
extern crate test;
use crate::common::CompareMode;
@ -30,6 +22,7 @@ use crate::util::logv;
use walkdir::WalkDir;
use env_logger;
use getopts;
use log::*;
use self::header::{EarlyProps, Ignore};

View file

@ -29,6 +29,9 @@ use std::path::{Path, PathBuf};
use std::process::{Child, Command, ExitStatus, Output, Stdio};
use std::str;
use lazy_static::lazy_static;
use log::*;
use crate::extract_gdb_version;
use crate::is_android_gdb_target;

View file

@ -3,6 +3,8 @@ use std::env;
use std::path::PathBuf;
use crate::common::Config;
use log::*;
/// Conversion table from triple OS name to Rust SYSNAME
const OS_TABLE: &'static [(&'static str, &'static str)] = &[
("android", "android"),

View file

@ -6,6 +6,5 @@ edition = "2018"
[dependencies]
regex = "1"
serde = "1.0.8"
serde_derive = "1.0.8"
serde = { version = "1.0.8", features = ["derive"] }
serde_json = "1.0.2"

View file

@ -5,7 +5,7 @@ use std::fs;
use std::path::Path;
use std::process::Command;
use serde_derive::Deserialize;
use serde::Deserialize;
use serde_json;
const LICENSES: &[&str] = &[