Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 18 pull requests #65152

Merged
merged 52 commits into from
Oct 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0797712
Stabilize Option::deref and Option::deref_mut
SimonSapin Sep 23, 2019
f1835bc
Stabilize UdpSocket::peer_addr
messense Sep 24, 2019
1d06058
std: Reduce checks for `feature = "backtrace"`
alexcrichton Sep 25, 2019
1de6f74
Update src/libstd/net/udp.rs
Sep 26, 2019
e8796ca
Do not ICE when dereferencing non-Copy raw pointer
estebank Oct 2, 2019
1222cc9
permit asyncawait-ondeck to be added by anyone
nikomatsakis Oct 3, 2019
1fcbd90
Update triagebot.toml
nikomatsakis Oct 3, 2019
ed60cf2
When encountering chained operators use heuristics to recover from ba…
estebank Sep 30, 2019
6c9f298
review comments
estebank Sep 30, 2019
d7dceaa
Account for missing turbofish in paths too
estebank Sep 30, 2019
d27683a
Prove bad turbofish parser recovery in test
estebank Sep 30, 2019
dfdc369
review comments
estebank Oct 1, 2019
f1499a8
review comments
estebank Oct 1, 2019
02f57f8
review comments
estebank Oct 3, 2019
76456e7
review comments
estebank Oct 4, 2019
2d87bac
replace GeneratorSubsts with SubstsRef
csmoe Oct 3, 2019
fa7a87b
generate GeneratorSubsts from SubstsRef
csmoe Oct 3, 2019
774ea80
replace GeneratorSubsts inside related types
csmoe Oct 3, 2019
ef9fe10
remove GeneratorSubsts visitors
csmoe Oct 3, 2019
afc0bb9
clean up GeneratorSubsts
csmoe Oct 3, 2019
e9009c8
[const-prop] Fix ICE when trying to eval polymorphic promoted MIR
wesleywiser Oct 3, 2019
91a096a
move middle::liveness to rustc_passes
Mark-Simulacrum Oct 4, 2019
bb70782
middle::dead -> rustc_passes
Mark-Simulacrum Oct 4, 2019
82bfd8e
middle::entry -> rustc_passes
Mark-Simulacrum Oct 4, 2019
7c3f65b
middle::intrinsicck -> rustc_passes
Mark-Simulacrum Oct 4, 2019
d0a6805
Allow unused attributes to avoid incremental bug
Mark-Simulacrum Oct 4, 2019
d152d48
Fix lonely backtick
Qwaz Oct 4, 2019
c5f80aa
Remove unneeded visit_statement definition
spastorino Oct 4, 2019
8bb5c12
Update the documented default of -Z mutable-noalias
cuviper Oct 4, 2019
5f94a53
Account for macro invocation in `let mut $pat` diagnostic.
Centril Oct 5, 2019
173958a
Replaces some instances of `as *[const | mut] _` with `.cast()`
memoryruins Oct 5, 2019
318ff30
Fix typo on `now()` comments
Oct 5, 2019
080aa86
lint: extern non-exhaustive types are improper
davidtwco Oct 5, 2019
d16b7f7
Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r…
tmandry Oct 6, 2019
0085263
Rollup merge of #64708 - SimonSapin:option-deref, r=Centril
tmandry Oct 6, 2019
019b5b5
Rollup merge of #64728 - messense:udp-peer-addr, r=dtolnay
tmandry Oct 6, 2019
ae2a720
Rollup merge of #64765 - alexcrichton:less-check-backtrace, r=sfackler
tmandry Oct 6, 2019
c7d7e37
Rollup merge of #64909 - estebank:turbofish-reloaded, r=Centril
tmandry Oct 6, 2019
2b225ba
Rollup merge of #65011 - estebank:ice-o-matic, r=zackmdavis
tmandry Oct 6, 2019
df471c1
Rollup merge of #65064 - rust-lang:permit-asyncawait-ondeck-by-anyone…
tmandry Oct 6, 2019
f14d374
Rollup merge of #65066 - wesleywiser:fix_const_prop_ice_on_polymorphi…
tmandry Oct 6, 2019
7739f17
Rollup merge of #65100 - csmoe:generator, r=nikomatsakis
tmandry Oct 6, 2019
2c8cbcc
Rollup merge of #65105 - Mark-Simulacrum:split-librustc, r=nikomatsakis
tmandry Oct 6, 2019
f80656c
Rollup merge of #65106 - Mark-Simulacrum:unused-attr-allow, r=Centril
tmandry Oct 6, 2019
1ac1407
Rollup merge of #65113 - Qwaz:master, r=jonas-schievink
tmandry Oct 6, 2019
2f4b471
Rollup merge of #65116 - spastorino:remove-unneeded-fn, r=oli-obk
tmandry Oct 6, 2019
a1eac17
Rollup merge of #65118 - cuviper:Zmutable-noalias-default, r=rkruppe
tmandry Oct 6, 2019
f5c8e12
Rollup merge of #65123 - Centril:mac-invoc-in-mut-pat, r=estebank
tmandry Oct 6, 2019
42caed9
Rollup merge of #65124 - memoryruins:castaway, r=petrochenkov
tmandry Oct 6, 2019
d54082e
Rollup merge of #65126 - BO41:time_typo, r=kennytm
tmandry Oct 6, 2019
485f5c9
Rollup merge of #65130 - davidtwco:rfc-2008-improper-ctypes, r=petroc…
tmandry Oct 6, 2019
69598dc
Rollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandry
tmandry Oct 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3613,6 +3613,8 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_errors",
"rustc_index",
"rustc_target",
"syntax",
"syntax_pos",
]
Expand Down
1 change: 0 additions & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@
# but you can also optionally enable the "emscripten" backend for asm.js or
# make this an empty array (but that probably won't get too far in the
# bootstrap)
# FIXME: remove the obsolete emscripten backend option.
#codegen-backends = ["llvm"]

# This is the name of the directory in which codegen backends will get installed
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,6 @@ impl<'a> Builder<'a> {
Some("-Wl,-rpath,@loader_path/../lib")
} else if !target.contains("windows") &&
!target.contains("wasm32") &&
!target.contains("emscripten") &&
!target.contains("fuchsia") {
Some("-Wl,-rpath,$ORIGIN/../lib")
} else {
Expand Down
5 changes: 2 additions & 3 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1047,11 +1047,10 @@ impl Step for Compiletest {
// Also provide `rust_test_helpers` for the host.
builder.ensure(native::TestHelpers { target: compiler.host });

// As well as the target, except for plain wasm32, which can't build it
if !target.contains("wasm32") || target.contains("emscripten") {
// wasm32 can't build the test helpers
if !target.contains("wasm32") {
builder.ensure(native::TestHelpers { target });
}

builder.ensure(RemoteCopyLibs { compiler, target });

let mut cmd = builder.tool_cmd(Tool::Compiletest);
Expand Down
29 changes: 20 additions & 9 deletions src/ci/docker/asmjs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
sudo \
gdb \
xz-utils \
bzip2
xz-utils

COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh
Expand All @@ -21,16 +20,28 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

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 PATH=$PATH:/emsdk-portable/clang/e1.38.15_64bit/
ENV PATH=$PATH:/emsdk-portable/emscripten/1.38.15/
ENV PATH=$PATH:/emsdk-portable/node/8.9.1_64bit/bin/
ENV EMSCRIPTEN=/emsdk-portable/emscripten/1.38.15/
ENV BINARYEN_ROOT=/emsdk-portable/clang/e1.38.15_64bit/binaryen/
ENV EM_CONFIG=/emsdk-portable/.emscripten

ENV TARGETS=asmjs-unknown-emscripten

ENV SCRIPT python2.7 ../x.py test --target $TARGETS
ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests

# This is almost identical to the wasm32-unknown-emscripten target, so
# running with assertions again is not useful
ENV NO_DEBUG_ASSERTIONS=1
ENV SCRIPT python2.7 ../x.py test --target $TARGETS \
src/test/ui \
src/test/run-fail \
src/libstd \
src/liballoc \
src/libcore

# Debug assertions in rustc are largely covered by other builders, and LLVM
# assertions cause this builder to slow down by quite a large amount and don't
# buy us a huge amount over other builders (not sure if we've ever seen an
# asmjs-specific backend assertion trip), so disable assertions for these
# tests.
ENV NO_LLVM_ASSERTIONS=1
ENV NO_DEBUG_ASSERTIONS=1
35 changes: 35 additions & 0 deletions src/ci/docker/disabled/wasm32-exp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
file \
curl \
ca-certificates \
python \
git \
cmake \
sudo \
gdb \
xz-utils \
jq \
bzip2

# emscripten
COPY scripts/emscripten-wasm.sh /scripts/
COPY wasm32-exp/node.sh /usr/local/bin/node
RUN bash /scripts/emscripten-wasm.sh

# cache
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

# env
ENV PATH=/wasm-install/emscripten:/wasm-install/bin:$PATH
ENV EM_CONFIG=/root/.emscripten

ENV TARGETS=wasm32-experimental-emscripten

ENV RUST_CONFIGURE_ARGS --experimental-targets=WebAssembly

ENV SCRIPT python2.7 ../x.py test --target $TARGETS
9 changes: 9 additions & 0 deletions src/ci/docker/disabled/wasm32-exp/node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

path="$(dirname $1)"
file="$(basename $1)"

shift

cd "$path"
exec /node-v8.0.0-linux-x64/bin/node "$file" "$@"
22 changes: 8 additions & 14 deletions src/ci/docker/disabled/wasm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
sudo \
gdb \
xz-utils \
bzip2
xz-utils

# emscripten
COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

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 PATH=$PATH:/emsdk-portable/clang/e1.38.15_64bit/
ENV PATH=$PATH:/emsdk-portable/emscripten/1.38.15/
ENV PATH=$PATH:/emsdk-portable/node/8.9.1_64bit/bin/
ENV EMSCRIPTEN=/emsdk-portable/emscripten/1.38.15/
ENV BINARYEN_ROOT=/emsdk-portable/clang/e1.38.15_64bit/binaryen/
ENV EM_CONFIG=/emsdk-portable/.emscripten

ENV TARGETS=wasm32-unknown-emscripten

# FIXME: Re-enable these tests once Cargo stops trying to execute wasms
ENV SCRIPT python2.7 ../x.py test --target $TARGETS \
--exclude src/libcore \
--exclude src/liballoc \
--exclude src/libproc_macro \
--exclude src/libstd \
--exclude src/libterm \
--exclude src/libtest
ENV SCRIPT python2.7 ../x.py test --target $TARGETS
37 changes: 37 additions & 0 deletions src/ci/docker/scripts/emscripten-wasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
set -ex

hide_output() {
set +x
on_err="
echo ERROR: An error was encountered with the build.
cat /tmp/build.log
exit 1
"
trap "$on_err" ERR
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
PING_LOOP_PID=$!
$@ &> /tmp/build.log
trap - ERR
kill $PING_LOOP_PID
rm -f /tmp/build.log
set -x
}

# Download last known good emscripten from WebAssembly waterfall
BUILD=$(curl -fL https://storage.googleapis.com/wasm-llvm/builds/linux/lkgr.json | \
jq '.build | tonumber')
curl -sL https://storage.googleapis.com/wasm-llvm/builds/linux/$BUILD/wasm-binaries.tbz2 | \
hide_output tar xvkj

# node 8 is required to run wasm
cd /
curl -sL https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
tar -xJ

# Make emscripten use wasm-ready node and LLVM tools
echo "EMSCRIPTEN_ROOT = '/wasm-install/emscripten'" >> /root/.emscripten
echo "NODE_JS='/usr/local/bin/node'" >> /root/.emscripten
echo "LLVM_ROOT='/wasm-install/bin'" >> /root/.emscripten
echo "BINARYEN_ROOT = '/wasm-install'" >> /root/.emscripten
echo "COMPILER_ENGINE = NODE_JS" >> /root/.emscripten
echo "JS_ENGINES = [NODE_JS]" >> /root/.emscripten
11 changes: 8 additions & 3 deletions src/ci/docker/scripts/emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ exit 1
set -x
}

git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
cd /
curl -fL https://mozilla-games.s3.amazonaws.com/emscripten/releases/emsdk-portable.tar.gz | \
tar -xz

cd /emsdk-portable
hide_output ./emsdk install 1.38.46-upstream
./emsdk activate 1.38.46-upstream
./emsdk update
hide_output ./emsdk install sdk-1.38.15-64bit
./emsdk activate sdk-1.38.15-64bit

# Compile and cache libc
source ./emsdk_env.sh
echo "main(){}" > a.c
HOME=/emsdk-portable/ emcc a.c
HOME=/emsdk-portable/ emcc -s BINARYEN=1 a.c
rm -f a.*

# Make emsdk usable by any user
Expand Down
13 changes: 6 additions & 7 deletions src/liballoc/tests/binary_heap.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
use std::cmp;
use std::collections::BinaryHeap;
use std::collections::binary_heap::{Drain, PeekMut};
use std::panic::{self, AssertUnwindSafe};
use std::sync::atomic::{AtomicUsize, Ordering};

use rand::{thread_rng, seq::SliceRandom};

#[test]
fn test_iterator() {
Expand Down Expand Up @@ -276,15 +281,9 @@ fn assert_covariance() {
// even if the order may not be correct.
//
// Destructors must be called exactly once per element.
// FIXME: re-enable emscripten once it can unwind again
#[test]
#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics
#[cfg(not(miri))] // Miri does not support catching panics
fn panic_safe() {
use std::cmp;
use std::panic::{self, AssertUnwindSafe};
use std::sync::atomic::{AtomicUsize, Ordering};
use rand::{thread_rng, seq::SliceRandom};

static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0);

#[derive(Eq, PartialEq, Ord, Clone, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/tests/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ mod slice_index {
}

#[test]
#[cfg(not(target_os = "emscripten"))] // hits an OOM
#[cfg(not(target_arch = "asmjs"))] // hits an OOM
#[cfg(not(miri))] // Miri is too slow
fn simple_big() {
fn a_million_letter_x() -> String {
Expand Down
10 changes: 0 additions & 10 deletions src/liballoc/tests/str.rs.rej

This file was deleted.

7 changes: 2 additions & 5 deletions src/liballoc/tests/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,8 @@ fn drain_filter_complex() {
}
}

// Miri does not support catching panics
// FIXME: re-enable emscripten once it can unwind again
#[test]
#[cfg(not(any(miri, target_os = "emscripten")))]
#[cfg(not(miri))] // Miri does not support catching panics
fn drain_filter_consumed_panic() {
use std::rc::Rc;
use std::sync::Mutex;
Expand Down Expand Up @@ -997,9 +995,8 @@ fn drain_filter_consumed_panic() {
}
}

// FIXME: Re-enable emscripten once it can catch panics
#[test]
#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics
#[cfg(not(miri))] // Miri does not support catching panics
fn drain_filter_unconsumed_panic() {
use std::rc::Rc;
use std::sync::Mutex;
Expand Down
Loading