bootstrap: fix edition
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
authors = ["The Rust Project Developers"]
|
authors = ["The Rust Project Developers"]
|
||||||
name = "bootstrap"
|
name = "bootstrap"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "bootstrap"
|
name = "bootstrap"
|
||||||
|
|||||||
@@ -21,20 +21,20 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
use cache::{Cache, Interned, INTERNER};
|
use crate::cache::{Cache, Interned, INTERNER};
|
||||||
use check;
|
use crate::check;
|
||||||
use compile;
|
use crate::compile;
|
||||||
use dist;
|
use crate::dist;
|
||||||
use doc;
|
use crate::doc;
|
||||||
use flags::Subcommand;
|
use crate::flags::Subcommand;
|
||||||
use install;
|
use crate::install;
|
||||||
use native;
|
use crate::native;
|
||||||
use test;
|
use crate::test;
|
||||||
use tool;
|
use crate::tool;
|
||||||
use util::{add_lib_path, exe, libdir};
|
use crate::util::{add_lib_path, exe, libdir};
|
||||||
use {Build, DocTests, Mode, GitRepo};
|
use crate::{Build, DocTests, Mode, GitRepo};
|
||||||
|
|
||||||
pub use Compiler;
|
pub use crate::Compiler;
|
||||||
|
|
||||||
use petgraph::graph::NodeIndex;
|
use petgraph::graph::NodeIndex;
|
||||||
use petgraph::Graph;
|
use petgraph::Graph;
|
||||||
@@ -1246,7 +1246,7 @@ impl<'a> Builder<'a> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod __test {
|
mod __test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use config::Config;
|
use crate::config::Config;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
fn configure(host: &[&str], target: &[&str]) -> Config {
|
fn configure(host: &[&str], target: &[&str]) -> Config {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
use std::cmp::{PartialOrd, Ord, Ordering};
|
use std::cmp::{PartialOrd, Ord, Ordering};
|
||||||
|
|
||||||
use builder::Step;
|
use crate::builder::Step;
|
||||||
|
|
||||||
pub struct Interned<T>(usize, PhantomData<*const T>);
|
pub struct Interned<T>(usize, PhantomData<*const T>);
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ use std::process::Command;
|
|||||||
use build_helper::output;
|
use build_helper::output;
|
||||||
use cc;
|
use cc;
|
||||||
|
|
||||||
use {Build, GitRepo};
|
use crate::{Build, GitRepo};
|
||||||
use config::Target;
|
use crate::config::Target;
|
||||||
use cache::Interned;
|
use crate::cache::Interned;
|
||||||
|
|
||||||
// The `cc` crate doesn't provide a way to obtain a path to the detected archiver,
|
// The `cc` crate doesn't provide a way to obtain a path to the detected archiver,
|
||||||
// so use some simplified logic here. First we respect the environment variable `AR`, then
|
// so use some simplified logic here. First we respect the environment variable `AR`, then
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ use std::process::Command;
|
|||||||
|
|
||||||
use build_helper::output;
|
use build_helper::output;
|
||||||
|
|
||||||
use Build;
|
use crate::Build;
|
||||||
use config::Config;
|
use crate::config::Config;
|
||||||
|
|
||||||
// The version number
|
// The version number
|
||||||
pub const CFG_RELEASE_NUM: &str = "1.32.0";
|
pub const CFG_RELEASE_NUM: &str = "1.32.0";
|
||||||
|
|||||||
@@ -10,11 +10,12 @@
|
|||||||
|
|
||||||
//! Implementation of compiling the compiler and standard library, in "check" mode.
|
//! Implementation of compiling the compiler and standard library, in "check" mode.
|
||||||
|
|
||||||
use compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env, add_to_sysroot};
|
use crate::compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env,
|
||||||
use builder::{RunConfig, Builder, ShouldRun, Step};
|
add_to_sysroot};
|
||||||
use tool::{prepare_tool_cargo, SourceType};
|
use crate::builder::{RunConfig, Builder, ShouldRun, Step};
|
||||||
use {Compiler, Mode};
|
use crate::tool::{prepare_tool_cargo, SourceType};
|
||||||
use cache::{INTERNER, Interned};
|
use crate::{Compiler, Mode};
|
||||||
|
use crate::cache::{INTERNER, Interned};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ use std::fs;
|
|||||||
use std::io::{self, ErrorKind};
|
use std::io::{self, ErrorKind};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use Build;
|
use crate::Build;
|
||||||
|
|
||||||
pub fn clean(build: &Build, all: bool) {
|
pub fn clean(build: &Build, all: bool) {
|
||||||
rm_rf("tmp".as_ref());
|
rm_rf("tmp".as_ref());
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ use build_helper::{output, mtime, up_to_date};
|
|||||||
use filetime::FileTime;
|
use filetime::FileTime;
|
||||||
use serde_json;
|
use serde_json;
|
||||||
|
|
||||||
use util::{exe, libdir, is_dylib};
|
use crate::util::{exe, libdir, is_dylib};
|
||||||
use {Compiler, Mode, GitRepo};
|
use crate::{Compiler, Mode, GitRepo};
|
||||||
use native;
|
use crate::native;
|
||||||
|
|
||||||
use cache::{INTERNER, Interned};
|
use crate::cache::{INTERNER, Interned};
|
||||||
use builder::{Step, RunConfig, ShouldRun, Builder};
|
use crate::builder::{Step, RunConfig, ShouldRun, Builder};
|
||||||
|
|
||||||
#[derive(Debug, PartialOrd, Ord, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, PartialOrd, Ord, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct Std {
|
pub struct Std {
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ use std::cmp;
|
|||||||
|
|
||||||
use num_cpus;
|
use num_cpus;
|
||||||
use toml;
|
use toml;
|
||||||
use cache::{INTERNER, Interned};
|
use crate::cache::{INTERNER, Interned};
|
||||||
use flags::Flags;
|
use crate::flags::Flags;
|
||||||
pub use flags::Subcommand;
|
pub use crate::flags::Subcommand;
|
||||||
|
|
||||||
/// Global configuration for the entire build and/or bootstrap.
|
/// Global configuration for the entire build and/or bootstrap.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ use std::process::{Command, Stdio};
|
|||||||
|
|
||||||
use build_helper::output;
|
use build_helper::output;
|
||||||
|
|
||||||
use {Compiler, Mode, LLVM_TOOLS};
|
use crate::{Compiler, Mode, LLVM_TOOLS};
|
||||||
use channel;
|
use crate::channel;
|
||||||
use util::{libdir, is_dylib, exe};
|
use crate::util::{libdir, is_dylib, exe};
|
||||||
use builder::{Builder, RunConfig, ShouldRun, Step};
|
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
|
||||||
use compile;
|
use crate::compile;
|
||||||
use tool::{self, Tool};
|
use crate::tool::{self, Tool};
|
||||||
use cache::{INTERNER, Interned};
|
use crate::cache::{INTERNER, Interned};
|
||||||
use time;
|
use time;
|
||||||
|
|
||||||
pub fn pkgname(builder: &Builder, component: &str) -> String {
|
pub fn pkgname(builder: &Builder, component: &str) -> String {
|
||||||
|
|||||||
@@ -22,15 +22,15 @@ use std::fs;
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::path::{PathBuf, Path};
|
use std::path::{PathBuf, Path};
|
||||||
|
|
||||||
use Mode;
|
use crate::Mode;
|
||||||
use build_helper::up_to_date;
|
use build_helper::up_to_date;
|
||||||
|
|
||||||
use util::symlink_dir;
|
use crate::util::symlink_dir;
|
||||||
use builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
|
use crate::builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
|
||||||
use tool::{self, prepare_tool_cargo, Tool, SourceType};
|
use crate::tool::{self, prepare_tool_cargo, Tool, SourceType};
|
||||||
use compile;
|
use crate::compile;
|
||||||
use cache::{INTERNER, Interned};
|
use crate::cache::{INTERNER, Interned};
|
||||||
use config::Config;
|
use crate::config::Config;
|
||||||
|
|
||||||
macro_rules! book {
|
macro_rules! book {
|
||||||
($($name:ident, $path:expr, $book_name:expr;)+) => {
|
($($name:ident, $path:expr, $book_name:expr;)+) => {
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ use std::process;
|
|||||||
|
|
||||||
use getopts::Options;
|
use getopts::Options;
|
||||||
|
|
||||||
use builder::Builder;
|
use crate::builder::Builder;
|
||||||
use config::Config;
|
use crate::config::Config;
|
||||||
use metadata;
|
use crate::metadata;
|
||||||
use {Build, DocTests};
|
use crate::{Build, DocTests};
|
||||||
|
|
||||||
use cache::{Interned, INTERNER};
|
use crate::cache::{Interned, INTERNER};
|
||||||
|
|
||||||
/// Deserialized version of all flags for this compile.
|
/// Deserialized version of all flags for this compile.
|
||||||
pub struct Flags {
|
pub struct Flags {
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ use std::fs;
|
|||||||
use std::path::{Path, PathBuf, Component};
|
use std::path::{Path, PathBuf, Component};
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use dist::{self, pkgname, sanitize_sh, tmpdir};
|
use crate::dist::{self, pkgname, sanitize_sh, tmpdir};
|
||||||
|
|
||||||
use builder::{Builder, RunConfig, ShouldRun, Step};
|
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
|
||||||
use cache::Interned;
|
use crate::cache::Interned;
|
||||||
use config::Config;
|
use crate::config::Config;
|
||||||
|
|
||||||
pub fn install_docs(builder: &Builder, stage: u32, host: Interned<String>) {
|
pub fn install_docs(builder: &Builder, stage: u32, host: Interned<String>) {
|
||||||
install_sh(builder, "docs", "rust-docs", stage, Some(host));
|
install_sh(builder, "docs", "rust-docs", stage, Some(host));
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use Build;
|
use crate::Build;
|
||||||
|
|
||||||
type HANDLE = *mut u8;
|
type HANDLE = *mut u8;
|
||||||
type BOOL = i32;
|
type BOOL = i32;
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ 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::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime};
|
||||||
use filetime::FileTime;
|
use filetime::FileTime;
|
||||||
|
|
||||||
use util::{exe, libdir, OutputFolder, CiEnv};
|
use crate::util::{exe, libdir, OutputFolder, CiEnv};
|
||||||
|
|
||||||
mod cc_detect;
|
mod cc_detect;
|
||||||
mod channel;
|
mod channel;
|
||||||
@@ -188,7 +188,7 @@ mod job;
|
|||||||
mod job {
|
mod job {
|
||||||
use libc;
|
use libc;
|
||||||
|
|
||||||
pub unsafe fn setup(build: &mut ::Build) {
|
pub unsafe fn setup(build: &mut crate::Build) {
|
||||||
if build.config.low_priority {
|
if build.config.low_priority {
|
||||||
libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
|
libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
|
||||||
}
|
}
|
||||||
@@ -197,14 +197,14 @@ mod job {
|
|||||||
|
|
||||||
#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
|
#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
|
||||||
mod job {
|
mod job {
|
||||||
pub unsafe fn setup(_build: &mut ::Build) {
|
pub unsafe fn setup(_build: &mut crate::Build) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use config::Config;
|
pub use crate::config::Config;
|
||||||
use flags::Subcommand;
|
use crate::flags::Subcommand;
|
||||||
use cache::{Interned, INTERNER};
|
use crate::cache::{Interned, INTERNER};
|
||||||
use toolstate::ToolState;
|
use crate::toolstate::ToolState;
|
||||||
|
|
||||||
const LLVM_TOOLS: &[&str] = &[
|
const LLVM_TOOLS: &[&str] = &[
|
||||||
"llvm-nm", // used to inspect binaries; it shows symbol names, their sizes and visibility
|
"llvm-nm", // used to inspect binaries; it shows symbol names, their sizes and visibility
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ use std::collections::HashSet;
|
|||||||
use build_helper::output;
|
use build_helper::output;
|
||||||
use serde_json;
|
use serde_json;
|
||||||
|
|
||||||
use {Build, Crate};
|
use crate::{Build, Crate};
|
||||||
use cache::INTERNER;
|
use crate::cache::INTERNER;
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct Output {
|
struct Output {
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ use build_helper::output;
|
|||||||
use cmake;
|
use cmake;
|
||||||
use cc;
|
use cc;
|
||||||
|
|
||||||
use util::{self, exe};
|
use crate::util::{self, exe};
|
||||||
use build_helper::up_to_date;
|
use build_helper::up_to_date;
|
||||||
use builder::{Builder, RunConfig, ShouldRun, Step};
|
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
|
||||||
use cache::Interned;
|
use crate::cache::Interned;
|
||||||
use GitRepo;
|
use crate::GitRepo;
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||||
pub struct Llvm {
|
pub struct Llvm {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ use std::process::Command;
|
|||||||
|
|
||||||
use build_helper::output;
|
use build_helper::output;
|
||||||
|
|
||||||
use Build;
|
use crate::Build;
|
||||||
|
|
||||||
struct Finder {
|
struct Finder {
|
||||||
cache: HashMap<OsString, Option<PathBuf>>,
|
cache: HashMap<OsString, Option<PathBuf>>,
|
||||||
|
|||||||
@@ -23,17 +23,17 @@ use std::process::Command;
|
|||||||
|
|
||||||
use build_helper::{self, output};
|
use build_helper::{self, output};
|
||||||
|
|
||||||
use builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
|
use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
|
||||||
use cache::{Interned, INTERNER};
|
use crate::cache::{Interned, INTERNER};
|
||||||
use compile;
|
use crate::compile;
|
||||||
use dist;
|
use crate::dist;
|
||||||
use flags::Subcommand;
|
use crate::flags::Subcommand;
|
||||||
use native;
|
use crate::native;
|
||||||
use tool::{self, Tool, SourceType};
|
use crate::tool::{self, Tool, SourceType};
|
||||||
use toolstate::ToolState;
|
use crate::toolstate::ToolState;
|
||||||
use util::{self, dylib_path, dylib_path_var};
|
use crate::util::{self, dylib_path, dylib_path_var};
|
||||||
use Crate as CargoCrate;
|
use crate::Crate as CargoCrate;
|
||||||
use {DocTests, Mode, GitRepo};
|
use crate::{DocTests, Mode, GitRepo};
|
||||||
|
|
||||||
const ADB_TEST_DIR: &str = "/data/tmp/work";
|
const ADB_TEST_DIR: &str = "/data/tmp/work";
|
||||||
|
|
||||||
@@ -577,7 +577,7 @@ impl Step for RustdocJS {
|
|||||||
if let Some(ref nodejs) = builder.config.nodejs {
|
if let Some(ref nodejs) = builder.config.nodejs {
|
||||||
let mut command = Command::new(nodejs);
|
let mut command = Command::new(nodejs);
|
||||||
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
|
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
|
||||||
builder.ensure(::doc::Std {
|
builder.ensure(crate::doc::Std {
|
||||||
target: self.target,
|
target: self.target,
|
||||||
stage: builder.top_stage,
|
stage: builder.top_stage,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -15,16 +15,16 @@ use std::path::PathBuf;
|
|||||||
use std::process::{Command, exit};
|
use std::process::{Command, exit};
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use Mode;
|
use crate::Mode;
|
||||||
use Compiler;
|
use crate::Compiler;
|
||||||
use builder::{Step, RunConfig, ShouldRun, Builder};
|
use crate::builder::{Step, RunConfig, ShouldRun, Builder};
|
||||||
use util::{exe, add_lib_path};
|
use crate::util::{exe, add_lib_path};
|
||||||
use compile;
|
use crate::compile;
|
||||||
use native;
|
use crate::native;
|
||||||
use channel::GitInfo;
|
use crate::channel::GitInfo;
|
||||||
use channel;
|
use crate::channel;
|
||||||
use cache::Interned;
|
use crate::cache::Interned;
|
||||||
use toolstate::ToolState;
|
use crate::toolstate::ToolState;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
||||||
pub enum SourceType {
|
pub enum SourceType {
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::time::{SystemTime, Instant};
|
use std::time::{SystemTime, Instant};
|
||||||
|
|
||||||
use config::Config;
|
use crate::config::Config;
|
||||||
use builder::Builder;
|
use crate::builder::Builder;
|
||||||
|
|
||||||
/// Returns the `name` as the filename of a static library for `target`.
|
/// Returns the `name` as the filename of a static library for `target`.
|
||||||
pub fn staticlib(name: &str, target: &str) -> String {
|
pub fn staticlib(name: &str, target: &str) -> String {
|
||||||
|
|||||||
Reference in New Issue
Block a user