Skip to content

Commit

Permalink
Merge pull request #3 from rust-lang/master
Browse files Browse the repository at this point in the history
update from origin 2020-06-15
  • Loading branch information
richkadel committed Jun 15, 2020
2 parents d139a72 + f315c35 commit 395256a
Show file tree
Hide file tree
Showing 677 changed files with 15,725 additions and 5,435 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ jobs:
- name: install MSYS2
run: src/ci/scripts/install-msys2.sh
if: success() && !env.SKIP_JOB
- name: install MSYS2 packages
run: src/ci/scripts/install-msys2-packages.sh
if: success() && !env.SKIP_JOB
- name: install MinGW
run: src/ci/scripts/install-mingw.sh
if: success() && !env.SKIP_JOB
Expand Down Expand Up @@ -212,9 +209,6 @@ jobs:
- name: install MSYS2
run: src/ci/scripts/install-msys2.sh
if: success() && !env.SKIP_JOB
- name: install MSYS2 packages
run: src/ci/scripts/install-msys2-packages.sh
if: success() && !env.SKIP_JOB
- name: install MinGW
run: src/ci/scripts/install-mingw.sh
if: success() && !env.SKIP_JOB
Expand Down Expand Up @@ -434,11 +428,6 @@ jobs:
NO_DEBUG_ASSERTIONS: 1
NO_LLVM_ASSERTIONS: 1
os: windows-latest-xl
- name: x86_64-msvc-aux
env:
RUST_CHECK_TARGET: check-aux EXCLUDE_CARGO=1
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc"
os: windows-latest-xl
- name: x86_64-msvc-cargo
env:
SCRIPT: python x.py test src/tools/cargotest src/tools/cargo
Expand Down Expand Up @@ -564,9 +553,6 @@ jobs:
- name: install MSYS2
run: src/ci/scripts/install-msys2.sh
if: success() && !env.SKIP_JOB
- name: install MSYS2 packages
run: src/ci/scripts/install-msys2-packages.sh
if: success() && !env.SKIP_JOB
- name: install MinGW
run: src/ci/scripts/install-mingw.sh
if: success() && !env.SKIP_JOB
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ checksum = "716960a18f978640f25101b5cbf1c6f6b0d3192fab36a2d98ca96f0ecbe41010"

[[package]]
name = "cargo"
version = "0.46.0"
version = "0.47.0"
dependencies = [
"anyhow",
"atty",
Expand Down Expand Up @@ -1434,9 +1434,9 @@ dependencies = [

[[package]]
name = "hermit-abi"
version = "0.1.13"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71"
checksum = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909"
dependencies = [
"compiler_builtins",
"libc",
Expand Down Expand Up @@ -1848,9 +1848,9 @@ dependencies = [

[[package]]
name = "libgit2-sys"
version = "0.12.5+1.0.0"
version = "0.12.7+1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eadeec65514971355bf7134967a543f71372f35b53ac6c7143e7bd157f07535"
checksum = "bcd07968649bcb7b9351ecfde53ca4d27673cccfdf57c84255ec18710f3153e0"
dependencies = [
"cc",
"libc",
Expand Down
2 changes: 1 addition & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# the same format as above, but since these targets are experimental, they are
# not built by default and the experimental Rust compilation targets that depend
# on them will not work unless the user opts in to building them.
#experimental-targets = ""
#experimental-targets = "AVR"

# Cap the number of parallel linker invocations when compiling LLVM.
# This can be useful when building LLVM with debug info, which significantly
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash {
/// it's been assembled.
type Output: Clone;

/// Whether this step is run by default as part of its respective phase.
/// `true` here can still be overwritten by `should_run` calling `default_condition`.
const DEFAULT: bool = false;

/// If true, then this rule should be skipped if --target was specified, but --host was not
Expand Down Expand Up @@ -371,7 +373,6 @@ impl<'a> Builder<'a> {
test::UiFullDeps,
test::Rustdoc,
test::Pretty,
test::RunPassValgrindPretty,
test::Crate,
test::CrateLibrustc,
test::CrateRustdoc,
Expand Down
8 changes: 7 additions & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,13 @@ pub fn stream_cargo(
for line in stdout.lines() {
let line = t!(line);
match serde_json::from_str::<CargoMessage<'_>>(&line) {
Ok(msg) => cb(msg),
Ok(msg) => {
if builder.config.json_output {
// Forward JSON to stdout.
println!("{}", line);
}
cb(msg)
}
// If this was informational, just print it out and continue
Err(_) => println!("{}", line),
}
Expand Down
8 changes: 5 additions & 3 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,19 +619,21 @@ impl Step for DebuggerScripts {
cp_debugger_script("natvis/libcore.natvis");
cp_debugger_script("natvis/libstd.natvis");
} else {
cp_debugger_script("debugger_pretty_printers_common.py");
cp_debugger_script("rust_types.py");

// gdb debugger scripts
builder.install(&builder.src.join("src/etc/rust-gdb"), &sysroot.join("bin"), 0o755);
builder.install(&builder.src.join("src/etc/rust-gdbgui"), &sysroot.join("bin"), 0o755);

cp_debugger_script("gdb_load_rust_pretty_printers.py");
cp_debugger_script("gdb_rust_pretty_printing.py");
cp_debugger_script("gdb_lookup.py");
cp_debugger_script("gdb_providers.py");

// lldb debugger scripts
builder.install(&builder.src.join("src/etc/rust-lldb"), &sysroot.join("bin"), 0o755);

cp_debugger_script("lldb_rust_formatters.py");
cp_debugger_script("lldb_lookup.py");
cp_debugger_script("lldb_providers.py");
}
}
}
Expand Down
10 changes: 2 additions & 8 deletions src/bootstrap/mk/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Q := @
BOOTSTRAP_ARGS :=
endif

ifdef EXCLUDE_CARGO
AUX_ARGS :=
else
AUX_ARGS := src/tools/cargo src/tools/cargotest
endif

BOOTSTRAP := $(CFG_PYTHON) $(CFG_SRC_DIR)src/bootstrap/bootstrap.py

all:
Expand Down Expand Up @@ -48,8 +42,8 @@ check:
$(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS)
check-aux:
$(Q)$(BOOTSTRAP) test \
src/test/run-pass-valgrind/pretty \
$(AUX_ARGS) \
src/tools/cargo \
src/tools/cargotest \
$(BOOTSTRAP_ARGS)
check-bootstrap:
$(Q)$(CFG_PYTHON) $(CFG_SRC_DIR)src/bootstrap/bootstrap_test.py
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Step for Llvm {

let llvm_exp_targets = match builder.config.llvm_experimental_targets {
Some(ref s) => s,
None => "",
None => "AVR",
};

let assertions = if builder.config.llvm_assertions { "ON" } else { "OFF" };
Expand Down
12 changes: 3 additions & 9 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ impl Step for Cargotest {
fn run(self, builder: &Builder<'_>) {
let compiler = builder.compiler(self.stage, self.host);
builder.ensure(compile::Rustc { compiler, target: compiler.host });
let cargo = builder.ensure(tool::Cargo { compiler, target: compiler.host });

// Note that this is a short, cryptic, and not scoped directory name. This
// is currently to minimize the length of path on Windows where we otherwise
Expand All @@ -165,7 +166,7 @@ impl Step for Cargotest {
let mut cmd = builder.tool_cmd(Tool::CargoTest);
try_run(
builder,
cmd.arg(&builder.initial_cargo)
cmd.arg(&cargo)
.arg(&out_dir)
.env("RUSTC", builder.rustc(compiler))
.env("RUSTDOC", builder.rustdoc(compiler)),
Expand Down Expand Up @@ -553,7 +554,7 @@ impl Step for Clippy {

builder.add_rustc_lib_path(compiler, &mut cargo);

try_run(builder, &mut cargo.into());
builder.run(&mut cargo.into());
}
}

Expand Down Expand Up @@ -929,13 +930,6 @@ host_test!(UiFullDeps { path: "src/test/ui-fulldeps", mode: "ui", suite: "ui-ful
host_test!(Rustdoc { path: "src/test/rustdoc", mode: "rustdoc", suite: "rustdoc" });

host_test!(Pretty { path: "src/test/pretty", mode: "pretty", suite: "pretty" });
test!(RunPassValgrindPretty {
path: "src/test/run-pass-valgrind/pretty",
mode: "pretty",
suite: "run-pass-valgrind",
default: false,
host: true
});

default_test!(RunMake { path: "src/test/run-make", mode: "run-make", suite: "run-make" });

Expand Down
30 changes: 18 additions & 12 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ macro_rules! tool_extended {
$toolstate:ident,
$path:expr,
$tool_name:expr,
stable = $stable:expr,
$extra_deps:block;)+) => {
$(
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
Expand All @@ -606,17 +607,22 @@ macro_rules! tool_extended {

impl Step for $name {
type Output = Option<PathBuf>;
const DEFAULT: bool = true;
const DEFAULT: bool = true; // Overwritten below
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.path($path).default_condition(
builder.config.extended
&& builder.config.tools.as_ref().map_or(true, |tools| {
tools.iter().any(|tool| match tool.as_ref() {
"clippy" => $tool_name == "clippy-driver",
x => $tool_name == x,
&& builder.config.tools.as_ref().map_or(
// By default, on nightly/dev enable all tools, else only
// build stable tools.
$stable || builder.build.unstable_features(),
// If `tools` is set, search list for this tool.
|tools| {
tools.iter().any(|tool| match tool.as_ref() {
"clippy" => $tool_name == "clippy-driver",
x => $tool_name == x,
})
}),
)
Expand Down Expand Up @@ -652,20 +658,20 @@ macro_rules! tool_extended {
// Note: tools need to be also added to `Builder::get_step_descriptions` in `build.rs`
// to make `./x.py build <tool>` work.
tool_extended!((self, builder),
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", {};
CargoClippy, clippy, "src/tools/clippy", "cargo-clippy", {};
Clippy, clippy, "src/tools/clippy", "clippy-driver", {};
Miri, miri, "src/tools/miri", "miri", {};
CargoMiri, miri, "src/tools/miri/cargo-miri", "cargo-miri", {};
Rls, rls, "src/tools/rls", "rls", {
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", stable=true, {};
CargoClippy, clippy, "src/tools/clippy", "cargo-clippy", stable=true, {};
Clippy, clippy, "src/tools/clippy", "clippy-driver", stable=true, {};
Miri, miri, "src/tools/miri", "miri", stable=false, {};
CargoMiri, miri, "src/tools/miri/cargo-miri", "cargo-miri", stable=false, {};
Rls, rls, "src/tools/rls", "rls", stable=true, {
builder.ensure(Clippy {
compiler: self.compiler,
target: self.target,
extra_features: Vec::new(),
});
self.extra_features.push("clippy".to_owned());
};
Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", {};
Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, {};
);

impl<'a> Builder<'a> {
Expand Down
4 changes: 0 additions & 4 deletions src/ci/azure-pipelines/auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ jobs:
# FIXME(#59637)
NO_DEBUG_ASSERTIONS: 1
NO_LLVM_ASSERTIONS: 1
# MSVC aux tests
x86_64-msvc-aux:
RUST_CHECK_TARGET: check-aux EXCLUDE_CARGO=1
INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
x86_64-msvc-cargo:
SCRIPT: python x.py test src/tools/cargotest src/tools/cargo
INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld
Expand Down
4 changes: 0 additions & 4 deletions src/ci/azure-pipelines/steps/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ steps:
displayName: Install msys2
condition: and(succeeded(), not(variables.SKIP_JOB))

- bash: src/ci/scripts/install-msys2-packages.sh
displayName: Install msys2 packages
condition: and(succeeded(), not(variables.SKIP_JOB))

- bash: src/ci/scripts/install-mingw.sh
displayName: Install MinGW
condition: and(succeeded(), not(variables.SKIP_JOB))
Expand Down
10 changes: 6 additions & 4 deletions src/ci/docker/scripts/musl-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Versions of the toolchain components are configurable in `musl-cross-make/Makefile` and
# musl unlike GLIBC is forward compatible so upgrading it shouldn't break old distributions.
# Right now we have: Binutils 2.27, GCC 6.4.0, musl 1.1.22.
# Right now we have: Binutils 2.31.1, GCC 9.2.0, musl 1.1.24.
set -ex

hide_output() {
Expand Down Expand Up @@ -33,11 +33,13 @@ shift
# Apparently applying `-fPIC` everywhere allows them to link successfully.
export CFLAGS="-fPIC $CFLAGS"

git clone https://github.com/richfelker/musl-cross-make -b v0.9.8
git clone https://github.com/richfelker/musl-cross-make # -b v0.9.9
cd musl-cross-make
# A few commits ahead of v0.9.9 to include the cowpatch fix:
git checkout a54eb56f33f255dfca60be045f12a5cfaf5a72a9

hide_output make -j$(nproc) TARGET=$TARGET
hide_output make install TARGET=$TARGET OUTPUT=$OUTPUT
hide_output make -j$(nproc) TARGET=$TARGET MUSL_VER=1.1.24
hide_output make install TARGET=$TARGET MUSL_VER=1.1.24 OUTPUT=$OUTPUT

cd -

Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ shift
# Apparently applying `-fPIC` everywhere allows them to link successfully.
export CFLAGS="-fPIC $CFLAGS"

MUSL=musl-1.1.22
MUSL=musl-1.1.24

# may have been downloaded in a previous run
if [ ! -d $MUSL ]; then
Expand Down
3 changes: 3 additions & 0 deletions src/ci/docker/wasm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ENV PATH=$PATH:/emsdk-portable
ENV PATH=$PATH:/emsdk-portable/upstream/emscripten/
ENV PATH=$PATH:/emsdk-portable/node/12.9.1_64bit/bin/
ENV BINARYEN_ROOT=/emsdk-portable/upstream/
ENV EMSDK=/emsdk-portable
ENV EM_CONFIG=/emsdk-portable/.emscripten
ENV EM_CACHE=/emsdk-portable/upstream/emscripten/cache

ENV TARGETS=wasm32-unknown-emscripten

Expand Down
10 changes: 0 additions & 10 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ x--expand-yaml-anchors--remove:
run: src/ci/scripts/install-msys2.sh
<<: *step

- name: install MSYS2 packages
run: src/ci/scripts/install-msys2-packages.sh
<<: *step

- name: install MinGW
run: src/ci/scripts/install-mingw.sh
<<: *step
Expand Down Expand Up @@ -496,12 +492,6 @@ jobs:
NO_LLVM_ASSERTIONS: 1
<<: *job-windows-xl

- name: x86_64-msvc-aux
env:
RUST_CHECK_TARGET: check-aux EXCLUDE_CARGO=1
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
<<: *job-windows-xl

- name: x86_64-msvc-cargo
env:
SCRIPT: python x.py test src/tools/cargotest src/tools/cargo
Expand Down
27 changes: 0 additions & 27 deletions src/ci/scripts/install-msys2-packages.sh

This file was deleted.

Loading

0 comments on commit 395256a

Please sign in to comment.