Upgrade Emscripten targets to use upstream LLVM backend
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
This commit is contained in:
parent
31d75c4e9c
commit
9a55103b98
100 changed files with 166 additions and 424 deletions
|
@ -377,6 +377,7 @@
|
||||||
# but you can also optionally enable the "emscripten" backend for asm.js or
|
# 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
|
# make this an empty array (but that probably won't get too far in the
|
||||||
# bootstrap)
|
# bootstrap)
|
||||||
|
# FIXME: remove the obsolete emscripten backend option.
|
||||||
#codegen-backends = ["llvm"]
|
#codegen-backends = ["llvm"]
|
||||||
|
|
||||||
# This is the name of the directory in which codegen backends will get installed
|
# This is the name of the directory in which codegen backends will get installed
|
||||||
|
|
|
@ -1046,11 +1046,9 @@ impl Step for Compiletest {
|
||||||
|
|
||||||
// Also provide `rust_test_helpers` for the host.
|
// Also provide `rust_test_helpers` for the host.
|
||||||
builder.ensure(native::TestHelpers { target: compiler.host });
|
builder.ensure(native::TestHelpers { target: compiler.host });
|
||||||
|
// As well as the target
|
||||||
// wasm32 can't build the test helpers
|
|
||||||
if !target.contains("wasm32") {
|
|
||||||
builder.ensure(native::TestHelpers { target });
|
builder.ensure(native::TestHelpers { target });
|
||||||
}
|
|
||||||
builder.ensure(RemoteCopyLibs { compiler, target });
|
builder.ensure(RemoteCopyLibs { compiler, target });
|
||||||
|
|
||||||
let mut cmd = builder.tool_cmd(Tool::Compiletest);
|
let mut cmd = builder.tool_cmd(Tool::Compiletest);
|
||||||
|
|
|
@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
cmake \
|
cmake \
|
||||||
sudo \
|
sudo \
|
||||||
gdb \
|
gdb \
|
||||||
xz-utils
|
xz-utils \
|
||||||
|
bzip2
|
||||||
|
|
||||||
COPY scripts/emscripten.sh /scripts/
|
COPY scripts/emscripten.sh /scripts/
|
||||||
RUN bash /scripts/emscripten.sh
|
RUN bash /scripts/emscripten.sh
|
||||||
|
@ -20,28 +21,17 @@ COPY scripts/sccache.sh /scripts/
|
||||||
RUN sh /scripts/sccache.sh
|
RUN sh /scripts/sccache.sh
|
||||||
|
|
||||||
ENV PATH=$PATH:/emsdk-portable
|
ENV PATH=$PATH:/emsdk-portable
|
||||||
ENV PATH=$PATH:/emsdk-portable/clang/e1.38.15_64bit/
|
ENV PATH=$PATH:/emsdk-portable/upstream/emscripten/
|
||||||
ENV PATH=$PATH:/emsdk-portable/emscripten/1.38.15/
|
ENV PATH=$PATH:/emsdk-portable/node/12.9.1_64bit/bin/
|
||||||
ENV PATH=$PATH:/emsdk-portable/node/8.9.1_64bit/bin/
|
ENV BINARYEN_ROOT=/emsdk-portable/upstream/
|
||||||
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 EM_CONFIG=/emsdk-portable/.emscripten
|
||||||
|
|
||||||
ENV TARGETS=asmjs-unknown-emscripten
|
ENV TARGETS=asmjs-unknown-emscripten
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests
|
# TODO: Run run-fail, libcore, libstd, etc. once exceptions are enabled
|
||||||
|
ENV SCRIPT python2.7 ../x.py test --target $TARGETS src/test/ui
|
||||||
|
|
||||||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS \
|
# This is almost identical to the wasm32-unknown-emscripten target, so
|
||||||
src/test/ui \
|
# running with assertions again is not useful
|
||||||
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
|
ENV NO_DEBUG_ASSERTIONS=1
|
||||||
|
ENV NO_LLVM_ASSERTIONS=1
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
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
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
path="$(dirname $1)"
|
|
||||||
file="$(basename $1)"
|
|
||||||
|
|
||||||
shift
|
|
||||||
|
|
||||||
cd "$path"
|
|
||||||
exec /node-v8.0.0-linux-x64/bin/node "$file" "$@"
|
|
|
@ -11,9 +11,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
cmake \
|
cmake \
|
||||||
sudo \
|
sudo \
|
||||||
gdb \
|
gdb \
|
||||||
xz-utils
|
xz-utils \
|
||||||
|
bzip2
|
||||||
|
|
||||||
# emscripten
|
|
||||||
COPY scripts/emscripten.sh /scripts/
|
COPY scripts/emscripten.sh /scripts/
|
||||||
RUN bash /scripts/emscripten.sh
|
RUN bash /scripts/emscripten.sh
|
||||||
|
|
||||||
|
@ -21,12 +21,12 @@ COPY scripts/sccache.sh /scripts/
|
||||||
RUN sh /scripts/sccache.sh
|
RUN sh /scripts/sccache.sh
|
||||||
|
|
||||||
ENV PATH=$PATH:/emsdk-portable
|
ENV PATH=$PATH:/emsdk-portable
|
||||||
ENV PATH=$PATH:/emsdk-portable/clang/e1.38.15_64bit/
|
ENV PATH=$PATH:/emsdk-portable/upstream/emscripten/
|
||||||
ENV PATH=$PATH:/emsdk-portable/emscripten/1.38.15/
|
ENV PATH=$PATH:/emsdk-portable/node/12.9.1_64bit/bin/
|
||||||
ENV PATH=$PATH:/emsdk-portable/node/8.9.1_64bit/bin/
|
ENV BINARYEN_ROOT=/emsdk-portable/upstream/
|
||||||
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 EM_CONFIG=/emsdk-portable/.emscripten
|
||||||
|
|
||||||
ENV TARGETS=wasm32-unknown-emscripten
|
ENV TARGETS=wasm32-unknown-emscripten
|
||||||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS
|
|
||||||
|
# TODO: Run run-fail, libcore, libstd, etc. once exceptions are enabled
|
||||||
|
ENV SCRIPT python2.7 ../x.py test --target $TARGETS src/test/ui
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
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
|
|
|
@ -17,20 +17,15 @@ exit 1
|
||||||
set -x
|
set -x
|
||||||
}
|
}
|
||||||
|
|
||||||
cd /
|
git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
|
||||||
curl -fL https://mozilla-games.s3.amazonaws.com/emscripten/releases/emsdk-portable.tar.gz | \
|
|
||||||
tar -xz
|
|
||||||
|
|
||||||
cd /emsdk-portable
|
cd /emsdk-portable
|
||||||
./emsdk update
|
hide_output ./emsdk install 1.38.46-upstream
|
||||||
hide_output ./emsdk install sdk-1.38.15-64bit
|
./emsdk activate 1.38.46-upstream
|
||||||
./emsdk activate sdk-1.38.15-64bit
|
|
||||||
|
|
||||||
# Compile and cache libc
|
# Compile and cache libc
|
||||||
source ./emsdk_env.sh
|
source ./emsdk_env.sh
|
||||||
echo "main(){}" > a.c
|
echo "main(){}" > a.c
|
||||||
HOME=/emsdk-portable/ emcc a.c
|
HOME=/emsdk-portable/ emcc a.c
|
||||||
HOME=/emsdk-portable/ emcc -s BINARYEN=1 a.c
|
|
||||||
rm -f a.*
|
rm -f a.*
|
||||||
|
|
||||||
# Make emsdk usable by any user
|
# Make emsdk usable by any user
|
||||||
|
|
|
@ -49,8 +49,10 @@ impl fmt::Debug for c_void {
|
||||||
/// Basic implementation of a `va_list`.
|
/// Basic implementation of a `va_list`.
|
||||||
// The name is WIP, using `VaListImpl` for now.
|
// The name is WIP, using `VaListImpl` for now.
|
||||||
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
||||||
not(target_arch = "x86_64"), not(target_arch = "asmjs")),
|
not(target_arch = "x86_64")),
|
||||||
all(target_arch = "aarch64", target_os = "ios"),
|
all(target_arch = "aarch64", target_os = "ios"),
|
||||||
|
target_arch = "wasm32",
|
||||||
|
target_arch = "asmjs",
|
||||||
windows))]
|
windows))]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[unstable(feature = "c_variadic",
|
#[unstable(feature = "c_variadic",
|
||||||
|
@ -67,8 +69,10 @@ pub struct VaListImpl<'f> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
||||||
not(target_arch = "x86_64"), not(target_arch = "asmjs")),
|
not(target_arch = "x86_64")),
|
||||||
all(target_arch = "aarch64", target_os = "ios"),
|
all(target_arch = "aarch64", target_os = "ios"),
|
||||||
|
target_arch = "wasm32",
|
||||||
|
target_arch = "asmjs",
|
||||||
windows))]
|
windows))]
|
||||||
#[unstable(feature = "c_variadic",
|
#[unstable(feature = "c_variadic",
|
||||||
reason = "the `c_variadic` feature has not been properly tested on \
|
reason = "the `c_variadic` feature has not been properly tested on \
|
||||||
|
@ -137,38 +141,6 @@ pub struct VaListImpl<'f> {
|
||||||
_marker: PhantomData<&'f mut &'f c_void>,
|
_marker: PhantomData<&'f mut &'f c_void>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// asm.js ABI implementation of a `va_list`.
|
|
||||||
// asm.js uses the PNaCl ABI, which specifies that a `va_list` is
|
|
||||||
// an array of 4 32-bit integers, according to the old PNaCl docs at
|
|
||||||
// https://web.archive.org/web/20130518054430/https://www.chromium.org/nativeclient/pnacl/bitcode-abi#TOC-Derived-Types
|
|
||||||
// and clang does the same in `CreatePNaClABIBuiltinVaListDecl` from `lib/AST/ASTContext.cpp`
|
|
||||||
#[cfg(all(target_arch = "asmjs", not(windows)))]
|
|
||||||
#[repr(C)]
|
|
||||||
#[unstable(feature = "c_variadic",
|
|
||||||
reason = "the `c_variadic` feature has not been properly tested on \
|
|
||||||
all supported platforms",
|
|
||||||
issue = "44930")]
|
|
||||||
#[lang = "va_list"]
|
|
||||||
pub struct VaListImpl<'f> {
|
|
||||||
inner: [crate::mem::MaybeUninit<i32>; 4],
|
|
||||||
_marker: PhantomData<&'f mut &'f c_void>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(all(target_arch = "asmjs", not(windows)))]
|
|
||||||
#[unstable(feature = "c_variadic",
|
|
||||||
reason = "the `c_variadic` feature has not been properly tested on \
|
|
||||||
all supported platforms",
|
|
||||||
issue = "44930")]
|
|
||||||
impl<'f> fmt::Debug for VaListImpl<'f> {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
||||||
unsafe {
|
|
||||||
write!(f, "va_list* [{:#x}, {:#x}, {:#x}, {:#x}]",
|
|
||||||
self.inner[0].read(), self.inner[1].read(),
|
|
||||||
self.inner[2].read(), self.inner[3].read())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A wrapper for a `va_list`
|
/// A wrapper for a `va_list`
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -178,14 +150,18 @@ impl<'f> fmt::Debug for VaListImpl<'f> {
|
||||||
issue = "44930")]
|
issue = "44930")]
|
||||||
pub struct VaList<'a, 'f: 'a> {
|
pub struct VaList<'a, 'f: 'a> {
|
||||||
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
||||||
not(target_arch = "x86_64"), not(target_arch = "asmjs")),
|
not(target_arch = "x86_64")),
|
||||||
all(target_arch = "aarch64", target_os = "ios"),
|
all(target_arch = "aarch64", target_os = "ios"),
|
||||||
|
target_arch = "wasm32",
|
||||||
|
target_arch = "asmjs",
|
||||||
windows))]
|
windows))]
|
||||||
inner: VaListImpl<'f>,
|
inner: VaListImpl<'f>,
|
||||||
|
|
||||||
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc",
|
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc",
|
||||||
target_arch = "x86_64", target_arch = "asmjs"),
|
target_arch = "x86_64"),
|
||||||
any(not(target_arch = "aarch64"), not(target_os = "ios")),
|
any(not(target_arch = "aarch64"), not(target_os = "ios")),
|
||||||
|
not(target_arch = "wasm32"),
|
||||||
|
not(target_arch = "asmjs"),
|
||||||
not(windows)))]
|
not(windows)))]
|
||||||
inner: &'a mut VaListImpl<'f>,
|
inner: &'a mut VaListImpl<'f>,
|
||||||
|
|
||||||
|
@ -193,8 +169,10 @@ pub struct VaList<'a, 'f: 'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
|
||||||
not(target_arch = "x86_64"), not(target_arch = "asmjs")),
|
not(target_arch = "x86_64")),
|
||||||
all(target_arch = "aarch64", target_os = "ios"),
|
all(target_arch = "aarch64", target_os = "ios"),
|
||||||
|
target_arch = "wasm32",
|
||||||
|
target_arch = "asmjs",
|
||||||
windows))]
|
windows))]
|
||||||
#[unstable(feature = "c_variadic",
|
#[unstable(feature = "c_variadic",
|
||||||
reason = "the `c_variadic` feature has not been properly tested on \
|
reason = "the `c_variadic` feature has not been properly tested on \
|
||||||
|
@ -212,8 +190,10 @@ impl<'f> VaListImpl<'f> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc",
|
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc",
|
||||||
target_arch = "x86_64", target_arch = "asmjs"),
|
target_arch = "x86_64"),
|
||||||
any(not(target_arch = "aarch64"), not(target_os = "ios")),
|
any(not(target_arch = "aarch64"), not(target_os = "ios")),
|
||||||
|
not(target_arch = "wasm32"),
|
||||||
|
not(target_arch = "asmjs"),
|
||||||
not(windows)))]
|
not(windows)))]
|
||||||
#[unstable(feature = "c_variadic",
|
#[unstable(feature = "c_variadic",
|
||||||
reason = "the `c_variadic` feature has not been properly tested on \
|
reason = "the `c_variadic` feature has not been properly tested on \
|
||||||
|
|
|
@ -114,24 +114,8 @@ pub fn black_box<T>(dummy: T) -> T {
|
||||||
// this. LLVM's intepretation of inline assembly is that it's, well, a black
|
// this. LLVM's intepretation of inline assembly is that it's, well, a black
|
||||||
// box. This isn't the greatest implementation since it probably deoptimizes
|
// box. This isn't the greatest implementation since it probably deoptimizes
|
||||||
// more than we want, but it's so far good enough.
|
// more than we want, but it's so far good enough.
|
||||||
#[cfg(not(any(
|
|
||||||
target_arch = "asmjs",
|
|
||||||
all(
|
|
||||||
target_arch = "wasm32",
|
|
||||||
target_os = "emscripten"
|
|
||||||
)
|
|
||||||
)))]
|
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!("" : : "r"(&dummy));
|
asm!("" : : "r"(&dummy));
|
||||||
return dummy;
|
return dummy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not all platforms support inline assembly so try to do something without
|
|
||||||
// inline assembly which in theory still hinders at least some optimizations
|
|
||||||
// on those targets. This is the "best effort" scenario.
|
|
||||||
unsafe {
|
|
||||||
let ret = crate::ptr::read_volatile(&dummy);
|
|
||||||
crate::mem::forget(dummy);
|
|
||||||
ret
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,8 +257,7 @@ pub fn target_feature_whitelist(sess: &Session)
|
||||||
"hexagon" => HEXAGON_WHITELIST,
|
"hexagon" => HEXAGON_WHITELIST,
|
||||||
"mips" | "mips64" => MIPS_WHITELIST,
|
"mips" | "mips64" => MIPS_WHITELIST,
|
||||||
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
|
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
|
||||||
// wasm32 on emscripten does not support these target features
|
"wasm32" => WASM_WHITELIST,
|
||||||
"wasm32" if !sess.target.target.options.is_like_emscripten => WASM_WHITELIST,
|
|
||||||
_ => &[],
|
_ => &[],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,15 +142,12 @@ impl ModuleConfig {
|
||||||
// Copy what clang does by turning on loop vectorization at O2 and
|
// Copy what clang does by turning on loop vectorization at O2 and
|
||||||
// slp vectorization at O3. Otherwise configure other optimization aspects
|
// slp vectorization at O3. Otherwise configure other optimization aspects
|
||||||
// of this pass manager builder.
|
// of this pass manager builder.
|
||||||
// Turn off vectorization for emscripten, as it's not very well supported.
|
|
||||||
self.vectorize_loop = !sess.opts.cg.no_vectorize_loops &&
|
self.vectorize_loop = !sess.opts.cg.no_vectorize_loops &&
|
||||||
(sess.opts.optimize == config::OptLevel::Default ||
|
(sess.opts.optimize == config::OptLevel::Default ||
|
||||||
sess.opts.optimize == config::OptLevel::Aggressive) &&
|
sess.opts.optimize == config::OptLevel::Aggressive);
|
||||||
!sess.target.target.options.is_like_emscripten;
|
|
||||||
|
|
||||||
self.vectorize_slp = !sess.opts.cg.no_vectorize_slp &&
|
self.vectorize_slp = !sess.opts.cg.no_vectorize_slp &&
|
||||||
sess.opts.optimize == config::OptLevel::Aggressive &&
|
sess.opts.optimize == config::OptLevel::Aggressive;
|
||||||
!sess.target.target.options.is_like_emscripten;
|
|
||||||
|
|
||||||
// Some targets (namely, NVPTX) interact badly with the MergeFunctions
|
// Some targets (namely, NVPTX) interact badly with the MergeFunctions
|
||||||
// pass. This is because MergeFunctions can generate new function calls
|
// pass. This is because MergeFunctions can generate new function calls
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
use crate::abi::call::{FnType, ArgType, Uniform};
|
|
||||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
|
||||||
|
|
||||||
// Data layout: e-p:32:32-i64:64-v128:32:128-n32-S128
|
|
||||||
|
|
||||||
// See the https://github.com/kripken/emscripten-fastcomp-clang repository.
|
|
||||||
// The class `EmscriptenABIInfo` in `/lib/CodeGen/TargetInfo.cpp` contains the ABI definitions.
|
|
||||||
|
|
||||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'a, Ty>)
|
|
||||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
|
||||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout
|
|
||||||
{
|
|
||||||
if ret.layout.is_aggregate() {
|
|
||||||
if let Some(unit) = ret.layout.homogeneous_aggregate(cx).unit() {
|
|
||||||
let size = ret.layout.size;
|
|
||||||
if unit.size == size {
|
|
||||||
ret.cast_to(Uniform {
|
|
||||||
unit,
|
|
||||||
total: size
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.make_indirect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
|
||||||
if arg.layout.is_aggregate() {
|
|
||||||
arg.make_indirect_byval();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'a, Ty>)
|
|
||||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
|
||||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout
|
|
||||||
{
|
|
||||||
if !fty.ret.is_ignore() {
|
|
||||||
classify_ret_ty(cx, &mut fty.ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
for arg in &mut fty.args {
|
|
||||||
if arg.is_ignore() { continue; }
|
|
||||||
classify_arg_ty(arg);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,7 +5,6 @@ use crate::spec::{self, HasTargetSpec};
|
||||||
mod aarch64;
|
mod aarch64;
|
||||||
mod amdgpu;
|
mod amdgpu;
|
||||||
mod arm;
|
mod arm;
|
||||||
mod asmjs;
|
|
||||||
mod hexagon;
|
mod hexagon;
|
||||||
mod mips;
|
mod mips;
|
||||||
mod mips64;
|
mod mips64;
|
||||||
|
@ -557,14 +556,6 @@ impl<'a, Ty> FnType<'a, Ty> {
|
||||||
"powerpc" => powerpc::compute_abi_info(cx, self),
|
"powerpc" => powerpc::compute_abi_info(cx, self),
|
||||||
"powerpc64" => powerpc64::compute_abi_info(cx, self),
|
"powerpc64" => powerpc64::compute_abi_info(cx, self),
|
||||||
"s390x" => s390x::compute_abi_info(cx, self),
|
"s390x" => s390x::compute_abi_info(cx, self),
|
||||||
"asmjs" => asmjs::compute_abi_info(cx, self),
|
|
||||||
"wasm32" => {
|
|
||||||
if cx.target_spec().llvm_target.contains("emscripten") {
|
|
||||||
asmjs::compute_abi_info(cx, self)
|
|
||||||
} else {
|
|
||||||
wasm32::compute_abi_info(self)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"msp430" => msp430::compute_abi_info(self),
|
"msp430" => msp430::compute_abi_info(self),
|
||||||
"sparc" => sparc::compute_abi_info(cx, self),
|
"sparc" => sparc::compute_abi_info(cx, self),
|
||||||
"sparc64" => sparc64::compute_abi_info(cx, self),
|
"sparc64" => sparc64::compute_abi_info(cx, self),
|
||||||
|
@ -573,6 +564,7 @@ impl<'a, Ty> FnType<'a, Ty> {
|
||||||
"hexagon" => hexagon::compute_abi_info(self),
|
"hexagon" => hexagon::compute_abi_info(self),
|
||||||
"riscv32" => riscv::compute_abi_info(self, 32),
|
"riscv32" => riscv::compute_abi_info(self, 32),
|
||||||
"riscv64" => riscv::compute_abi_info(self, 64),
|
"riscv64" => riscv::compute_abi_info(self, 64),
|
||||||
|
"wasm32" | "asmjs" => wasm32::compute_abi_info(cx, self),
|
||||||
a => return Err(format!("unrecognized arch \"{}\" in target specification", a))
|
a => return Err(format!("unrecognized arch \"{}\" in target specification", a))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,38 @@
|
||||||
use crate::abi::call::{FnType, ArgType};
|
use crate::abi::call::{FnType, ArgType, Uniform};
|
||||||
|
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||||
|
|
||||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
|
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'a, Ty>)
|
||||||
ret.extend_integer_width_to(32);
|
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||||
|
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout
|
||||||
|
{
|
||||||
|
if ret.layout.is_aggregate() {
|
||||||
|
if let Some(unit) = ret.layout.homogeneous_aggregate(cx).unit() {
|
||||||
|
let size = ret.layout.size;
|
||||||
|
if unit.size == size {
|
||||||
|
ret.cast_to(Uniform {
|
||||||
|
unit,
|
||||||
|
total: size
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ret.make_indirect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||||
arg.extend_integer_width_to(32);
|
if arg.layout.is_aggregate() {
|
||||||
|
arg.make_indirect_byval();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
|
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'a, Ty>)
|
||||||
|
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||||
|
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout
|
||||||
|
{
|
||||||
if !fty.ret.is_ignore() {
|
if !fty.ret.is_ignore() {
|
||||||
classify_ret_ty(&mut fty.ret);
|
classify_ret_ty(cx, &mut fty.ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
for arg in &mut fty.args {
|
for arg in &mut fty.args {
|
||||||
|
|
|
@ -1,40 +1,10 @@
|
||||||
use super::{LinkArgs, LinkerFlavor, Target, TargetOptions};
|
use super::{LinkerFlavor, Target, wasm32_unknown_emscripten};
|
||||||
|
|
||||||
pub fn target() -> Result<Target, String> {
|
pub fn target() -> Result<Target, String> {
|
||||||
let mut args = LinkArgs::new();
|
let mut target = wasm32_unknown_emscripten::target()?;
|
||||||
args.insert(LinkerFlavor::Em,
|
target.options.post_link_args
|
||||||
vec!["-s".to_string(),
|
.entry(LinkerFlavor::Em)
|
||||||
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
|
.or_default()
|
||||||
"-s".to_string(),
|
.extend(vec!["-s".to_string(), "WASM=0".to_string()]);
|
||||||
"ABORTING_MALLOC=0".to_string(),
|
Ok(target)
|
||||||
"-s".to_string(),
|
|
||||||
"WASM=0".to_string()]);
|
|
||||||
|
|
||||||
let opts = TargetOptions {
|
|
||||||
dynamic_linking: false,
|
|
||||||
executables: true,
|
|
||||||
exe_suffix: ".js".to_string(),
|
|
||||||
linker_is_gnu: true,
|
|
||||||
allow_asm: false,
|
|
||||||
obj_is_bitcode: true,
|
|
||||||
is_like_emscripten: true,
|
|
||||||
max_atomic_width: Some(32),
|
|
||||||
post_link_args: args,
|
|
||||||
target_family: Some("unix".to_string()),
|
|
||||||
codegen_backend: "emscripten".to_string(),
|
|
||||||
.. Default::default()
|
|
||||||
};
|
|
||||||
Ok(Target {
|
|
||||||
llvm_target: "asmjs-unknown-emscripten".to_string(),
|
|
||||||
target_endian: "little".to_string(),
|
|
||||||
target_pointer_width: "32".to_string(),
|
|
||||||
target_c_int_width: "32".to_string(),
|
|
||||||
target_os: "emscripten".to_string(),
|
|
||||||
target_env: String::new(),
|
|
||||||
target_vendor: "unknown".to_string(),
|
|
||||||
data_layout: "e-p:32:32-i64:64-v128:32:128-n32-S128".to_string(),
|
|
||||||
arch: "asmjs".to_string(),
|
|
||||||
linker_flavor: LinkerFlavor::Em,
|
|
||||||
options: opts,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -462,7 +462,6 @@ supported_targets! {
|
||||||
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
|
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
|
||||||
("wasm32-unknown-unknown", wasm32_unknown_unknown),
|
("wasm32-unknown-unknown", wasm32_unknown_unknown),
|
||||||
("wasm32-wasi", wasm32_wasi),
|
("wasm32-wasi", wasm32_wasi),
|
||||||
("wasm32-experimental-emscripten", wasm32_experimental_emscripten),
|
|
||||||
|
|
||||||
("thumbv6m-none-eabi", thumbv6m_none_eabi),
|
("thumbv6m-none-eabi", thumbv6m_none_eabi),
|
||||||
("thumbv7m-none-eabi", thumbv7m_none_eabi),
|
("thumbv7m-none-eabi", thumbv7m_none_eabi),
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
use super::{LinkArgs, LinkerFlavor, Target, TargetOptions};
|
|
||||||
|
|
||||||
pub fn target() -> Result<Target, String> {
|
|
||||||
let mut post_link_args = LinkArgs::new();
|
|
||||||
post_link_args.insert(LinkerFlavor::Em,
|
|
||||||
vec!["-s".to_string(),
|
|
||||||
"WASM=1".to_string(),
|
|
||||||
"-s".to_string(),
|
|
||||||
"ASSERTIONS=1".to_string(),
|
|
||||||
"-s".to_string(),
|
|
||||||
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
|
|
||||||
"-g3".to_string()]);
|
|
||||||
|
|
||||||
let opts = TargetOptions {
|
|
||||||
dynamic_linking: false,
|
|
||||||
executables: true,
|
|
||||||
// Today emcc emits two files - a .js file to bootstrap and
|
|
||||||
// possibly interpret the wasm, and a .wasm file
|
|
||||||
exe_suffix: ".js".to_string(),
|
|
||||||
linker_is_gnu: true,
|
|
||||||
link_env: vec![("EMCC_WASM_BACKEND".to_string(), "1".to_string())],
|
|
||||||
allow_asm: false,
|
|
||||||
obj_is_bitcode: true,
|
|
||||||
is_like_emscripten: true,
|
|
||||||
max_atomic_width: Some(32),
|
|
||||||
post_link_args,
|
|
||||||
limit_rdylib_exports: false,
|
|
||||||
target_family: Some("unix".to_string()),
|
|
||||||
.. Default::default()
|
|
||||||
};
|
|
||||||
Ok(Target {
|
|
||||||
llvm_target: "wasm32-unknown-unknown".to_string(),
|
|
||||||
target_endian: "little".to_string(),
|
|
||||||
target_pointer_width: "32".to_string(),
|
|
||||||
target_c_int_width: "32".to_string(),
|
|
||||||
target_os: "emscripten".to_string(),
|
|
||||||
target_env: String::new(),
|
|
||||||
target_vendor: "unknown".to_string(),
|
|
||||||
data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(),
|
|
||||||
arch: "wasm32".to_string(),
|
|
||||||
linker_flavor: LinkerFlavor::Em,
|
|
||||||
options: opts,
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,45 +1,44 @@
|
||||||
use super::{LinkArgs, LinkerFlavor, Target, TargetOptions};
|
use super::wasm32_base;
|
||||||
|
use super::{LinkArgs, LinkerFlavor, Target, TargetOptions, PanicStrategy};
|
||||||
|
|
||||||
pub fn target() -> Result<Target, String> {
|
pub fn target() -> Result<Target, String> {
|
||||||
// FIXME(nikic) BINARYEN_TRAP_MODE=clamp is needed to avoid trapping in our
|
|
||||||
// -Zsaturating-float-casts implementation. This can be dropped if/when
|
|
||||||
// we have native fpto[su]i.sat intrinsics, or the implementation otherwise
|
|
||||||
// stops relying on non-trapping fpto[su]i.
|
|
||||||
let mut post_link_args = LinkArgs::new();
|
let mut post_link_args = LinkArgs::new();
|
||||||
post_link_args.insert(LinkerFlavor::Em,
|
post_link_args.insert(LinkerFlavor::Em,
|
||||||
vec!["-s".to_string(),
|
vec!["-s".to_string(),
|
||||||
"BINARYEN=1".to_string(),
|
|
||||||
"-s".to_string(),
|
|
||||||
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
|
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
|
||||||
"-s".to_string(),
|
"-s".to_string(),
|
||||||
"BINARYEN_TRAP_MODE='clamp'".to_string()]);
|
"ASSERTIONS=1".to_string(),
|
||||||
|
"-s".to_string(),
|
||||||
|
"DISABLE_EXCEPTION_CATCHING=1".to_string(),
|
||||||
|
// FIXME(tlively): Enable this linker option once libc type errors
|
||||||
|
// are resolved. See https://github.com/rust-lang/libc/pull/1478.
|
||||||
|
// "-Wl,--fatal-warnings".to_string(),
|
||||||
|
]);
|
||||||
|
|
||||||
let opts = TargetOptions {
|
let opts = TargetOptions {
|
||||||
dynamic_linking: false,
|
// emcc emits two files - a .js file to instantiate the wasm and supply platform
|
||||||
executables: true,
|
// functionality, and a .wasm file.
|
||||||
// Today emcc emits two files - a .js file to bootstrap and
|
|
||||||
// possibly interpret the wasm, and a .wasm file
|
|
||||||
exe_suffix: ".js".to_string(),
|
exe_suffix: ".js".to_string(),
|
||||||
|
linker: None,
|
||||||
linker_is_gnu: true,
|
linker_is_gnu: true,
|
||||||
allow_asm: false,
|
|
||||||
obj_is_bitcode: true,
|
|
||||||
is_like_emscripten: true,
|
is_like_emscripten: true,
|
||||||
max_atomic_width: Some(32),
|
// FIXME(tlively): Emscripten supports unwinding, but we would have to pass
|
||||||
|
// -enable-emscripten-cxx-exceptions to LLVM at codegen time and merge
|
||||||
|
// https://reviews.llvm.org/rG5c3cdef84b82464756bb571c13c31cf7773860c3to use it.
|
||||||
|
panic_strategy: PanicStrategy::Abort,
|
||||||
post_link_args,
|
post_link_args,
|
||||||
limit_rdylib_exports: false,
|
|
||||||
target_family: Some("unix".to_string()),
|
target_family: Some("unix".to_string()),
|
||||||
codegen_backend: "emscripten".to_string(),
|
.. wasm32_base::options()
|
||||||
.. Default::default()
|
|
||||||
};
|
};
|
||||||
Ok(Target {
|
Ok(Target {
|
||||||
llvm_target: "asmjs-unknown-emscripten".to_string(),
|
llvm_target: "wasm32-unknown-emscripten".to_string(),
|
||||||
target_endian: "little".to_string(),
|
target_endian: "little".to_string(),
|
||||||
target_pointer_width: "32".to_string(),
|
target_pointer_width: "32".to_string(),
|
||||||
target_c_int_width: "32".to_string(),
|
target_c_int_width: "32".to_string(),
|
||||||
target_os: "emscripten".to_string(),
|
target_os: "emscripten".to_string(),
|
||||||
target_env: String::new(),
|
target_env: String::new(),
|
||||||
target_vendor: "unknown".to_string(),
|
target_vendor: "unknown".to_string(),
|
||||||
data_layout: "e-p:32:32-i64:64-v128:32:128-n32-S128".to_string(),
|
data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(),
|
||||||
arch: "wasm32".to_string(),
|
arch: "wasm32".to_string(),
|
||||||
linker_flavor: LinkerFlavor::Em,
|
linker_flavor: LinkerFlavor::Em,
|
||||||
options: opts,
|
options: opts,
|
||||||
|
|
|
@ -360,7 +360,7 @@ impl<'a> fmt::Display for Html<'a> {
|
||||||
("target_arch", Some(arch)) => match &*arch.as_str() {
|
("target_arch", Some(arch)) => match &*arch.as_str() {
|
||||||
"aarch64" => "AArch64",
|
"aarch64" => "AArch64",
|
||||||
"arm" => "ARM",
|
"arm" => "ARM",
|
||||||
"asmjs" => "asm.js",
|
"asmjs" => "JavaScript",
|
||||||
"mips" => "MIPS",
|
"mips" => "MIPS",
|
||||||
"mips64" => "MIPS-64",
|
"mips64" => "MIPS-64",
|
||||||
"msp430" => "MSP430",
|
"msp430" => "MSP430",
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
// fallback implementation to use as well.
|
// fallback implementation to use as well.
|
||||||
//
|
//
|
||||||
// Due to rust-lang/rust#18804, make sure this is not generic!
|
// Due to rust-lang/rust#18804, make sure this is not generic!
|
||||||
#[cfg(any(target_os = "linux", target_os = "fuchsia", target_os = "hermit", target_os = "redox"))]
|
#[cfg(any(target_os = "linux", target_os = "fuchsia", target_os = "hermit", target_os = "redox",
|
||||||
|
target_os = "emscripten"))]
|
||||||
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
|
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
|
||||||
use crate::mem;
|
use crate::mem;
|
||||||
use crate::sys_common::thread_local::register_dtor_fallback;
|
use crate::sys_common::thread_local::register_dtor_fallback;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// compile-flags: -O
|
// compile-flags: -O
|
||||||
|
|
||||||
// ignore-asmjs
|
|
||||||
|
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
// min-llvm-version 7.0
|
// min-llvm-version 7.0
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// ignore-emscripten
|
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
// ignore-wasm32-bare no libc to test ffi with
|
// ignore-wasm32-bare no libc to test ffi with
|
||||||
|
|
||||||
|
// FIXME: This will work on emscripten once libc is updated to include
|
||||||
|
// rust-lang/libc/#1478
|
||||||
|
// ignore-emscripten libc type mismatch
|
||||||
|
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
|
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
//
|
//
|
||||||
// See issue #59123 for a full explanation.
|
// See issue #59123 for a full explanation.
|
||||||
|
|
||||||
// ignore-wasm32-bare (sizes don't match)
|
// ignore-emscripten (sizes don't match)
|
||||||
// run-pass
|
// run-pass
|
||||||
|
|
||||||
// edition:2018
|
// edition:2018
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018
|
// compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018
|
||||||
|
|
||||||
// run-pass
|
// run-pass
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
use std::task::Poll;
|
use std::task::Poll;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Check that partially moved from function parameters are dropped after the
|
// Check that partially moved from function parameters are dropped after the
|
||||||
// named bindings that move from them.
|
// named bindings that move from them.
|
||||||
|
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
use std::{panic, cell::RefCell};
|
use std::{panic, cell::RefCell};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
// compile-flags: -g
|
// compile-flags: -g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
#[derive(PartialEq, Eq)]
|
#[derive(PartialEq, Eq)]
|
||||||
struct NewBool(bool);
|
struct NewBool(bool);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
#![allow(unused_imports)]
|
#![allow(unused_imports)]
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
// Test that builtin implementations of `Clone` cleanup everything
|
// Test that builtin implementations of `Clone` cleanup everything
|
||||||
// in case of unwinding.
|
// in case of unwinding.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
fn worker() -> ! {
|
fn worker() -> ! {
|
||||||
panic!()
|
panic!()
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-emscripten no i128 support
|
|
||||||
#![feature(const_saturating_int_methods)]
|
#![feature(const_saturating_int_methods)]
|
||||||
|
|
||||||
const INT_U32_NO: u32 = (42 as u32).saturating_add(2);
|
const INT_U32_NO: u32 = (42 as u32).saturating_add(2);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
// aux-build:debuginfo-lto-aux.rs
|
// aux-build:debuginfo-lto-aux.rs
|
||||||
// compile-flags: -C lto -g
|
// compile-flags: -C lto -g
|
||||||
// no-prefer-dynamic
|
// no-prefer-dynamic
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
extern crate debuginfo_lto_aux;
|
extern crate debuginfo_lto_aux;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// run-pass
|
// run-pass
|
||||||
// edition:2018
|
// edition:2018
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![feature(slice_patterns)]
|
#![feature(slice_patterns)]
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#![allow(unused_assignments)]
|
#![allow(unused_assignments)]
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
|
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![feature(generators, generator_trait, untagged_unions)]
|
#![feature(generators, generator_trait, untagged_unions)]
|
||||||
#![feature(slice_patterns)]
|
#![feature(slice_patterns)]
|
||||||
|
|
3
src/test/ui/extern/extern-const.fixed
vendored
3
src/test/ui/extern/extern-const.fixed
vendored
|
@ -5,7 +5,8 @@
|
||||||
// compile. To sidestep this by using one that *is* defined.
|
// compile. To sidestep this by using one that *is* defined.
|
||||||
|
|
||||||
// run-rustfix
|
// run-rustfix
|
||||||
// ignore-wasm32 no external library to link to.
|
// ignore-wasm32-bare no external library to link to.
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
// compile-flags: -g
|
// compile-flags: -g
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
3
src/test/ui/extern/extern-const.rs
vendored
3
src/test/ui/extern/extern-const.rs
vendored
|
@ -5,7 +5,8 @@
|
||||||
// compile. To sidestep this by using one that *is* defined.
|
// compile. To sidestep this by using one that *is* defined.
|
||||||
|
|
||||||
// run-rustfix
|
// run-rustfix
|
||||||
// ignore-wasm32 no external library to link to.
|
// ignore-wasm32-bare no external library to link to.
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
// compile-flags: -g
|
// compile-flags: -g
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
2
src/test/ui/extern/extern-const.stderr
vendored
2
src/test/ui/extern/extern-const.stderr
vendored
|
@ -1,5 +1,5 @@
|
||||||
error: extern items cannot be `const`
|
error: extern items cannot be `const`
|
||||||
--> $DIR/extern-const.rs:15:5
|
--> $DIR/extern-const.rs:16:5
|
||||||
|
|
|
|
||||||
LL | const rust_dbg_static_mut: libc::c_int;
|
LL | const rust_dbg_static_mut: libc::c_int;
|
||||||
| ^^^^^ help: try using a static value: `static`
|
| ^^^^^ help: try using a static value: `static`
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// compile-flags: -g
|
// compile-flags: -g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
#![feature(generators, generator_trait)]
|
#![feature(generators, generator_trait)]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
|
|
||||||
// ignore-wasm32-bare compiled as panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![feature(generators, generator_trait)]
|
#![feature(generators, generator_trait)]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
|
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![feature(generators, generator_trait)]
|
#![feature(generators, generator_trait)]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
|
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![feature(generators, generator_trait)]
|
#![feature(generators, generator_trait)]
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
// edition:2018
|
// edition:2018
|
||||||
// ignore-wasm32 issue #62807
|
// ignore-wasm32 issue #62807
|
||||||
|
// ignore-asmjs issue #62807
|
||||||
|
|
||||||
#![feature(generators, generator_trait)]
|
#![feature(generators, generator_trait)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-emscripten no i128 support
|
|
||||||
|
|
||||||
#![feature(intrinsics)]
|
#![feature(intrinsics)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare always compiled as panic=abort right now
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
// Check that values are not leaked when a dtor panics (#14875)
|
// Check that values are not leaked when a dtor panics (#14875)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// aux-build:issue-24687-lib.rs
|
// aux-build:issue-24687-lib.rs
|
||||||
// compile-flags:-g
|
// compile-flags:-g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
extern crate issue_24687_lib as d;
|
extern crate issue_24687_lib as d;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// as options to the compiler.
|
// as options to the compiler.
|
||||||
|
|
||||||
// compile-flags:-g -g -O -O
|
// compile-flags:-g -g -O -O
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
assert_eq!(1, 1);
|
assert_eq!(1, 1);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// compile-flags:-g
|
// compile-flags:-g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
fn helper<F: FnOnce(usize) -> bool>(_f: F) {
|
fn helper<F: FnOnce(usize) -> bool>(_f: F) {
|
||||||
print!("");
|
print!("");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// compile-flags: -g
|
// compile-flags: -g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-windows
|
// ignore-windows
|
||||||
// ignore-macos
|
// ignore-macos
|
||||||
// ignore-wasm32-bare common linkage not implemented right now
|
// ignore-emscripten common linkage not implemented right now
|
||||||
|
|
||||||
#![feature(linkage)]
|
#![feature(linkage)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// compile-flags:-g
|
// compile-flags:-g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
// In this test we just want to make sure that the code below does not lead to
|
// In this test we just want to make sure that the code below does not lead to
|
||||||
// a debuginfo verification assertion during compilation. This was caused by the
|
// a debuginfo verification assertion during compilation. This was caused by the
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Regression test for #36856.
|
// Regression test for #36856.
|
||||||
|
|
||||||
// compile-flags:-g
|
// compile-flags:-g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
fn g() -> bool {
|
fn g() -> bool {
|
||||||
false
|
false
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Regression test for #42210.
|
// Regression test for #42210.
|
||||||
|
|
||||||
// compile-flags: -g
|
// compile-flags: -g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
trait Foo {
|
trait Foo {
|
||||||
fn foo() { }
|
fn foo() { }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
// compile-flags:--test -g
|
// compile-flags:--test -g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// compile-flags:--test -O
|
// compile-flags:--test -O
|
||||||
|
|
||||||
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "creating inhabited type")]
|
#[should_panic(expected = "creating inhabited type")]
|
||||||
fn test() {
|
fn test() {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
// compile-flags:-g
|
// compile-flags:-g
|
||||||
// ignore-pretty issue #37195
|
// ignore-pretty issue #37195
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
#![feature(non_ascii_idents)]
|
#![feature(non_ascii_idents)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// build-pass (FIXME(62277): could be check-pass?)
|
// build-pass (FIXME(62277): could be check-pass?)
|
||||||
// ignore-emscripten no i128 support
|
|
||||||
|
|
||||||
fn fibs(n: u32) -> impl Iterator<Item=u128> {
|
fn fibs(n: u32) -> impl Iterator<Item=u128> {
|
||||||
(0 .. n)
|
(0 .. n)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// compile-flags:-C debuginfo=2
|
// compile-flags:-C debuginfo=2
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
fn foo() -> impl Copy {
|
fn foo() -> impl Copy {
|
||||||
foo
|
foo
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// only-32bit too impatient for 2⁶⁴ items
|
// only-32bit too impatient for 2⁶⁴ items
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// compile-flags: -C debug_assertions=yes -C opt-level=3
|
// compile-flags: -C debug_assertions=yes -C opt-level=3
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// only-32bit too impatient for 2⁶⁴ items
|
// only-32bit too impatient for 2⁶⁴ items
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// compile-flags: -C debug_assertions=yes -C opt-level=3
|
// compile-flags: -C debug_assertions=yes -C opt-level=3
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// compile-flags: -C debug_assertions=yes
|
// compile-flags: -C debug_assertions=yes
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// compile-flags: -C debug_assertions=yes
|
// compile-flags: -C debug_assertions=yes
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// compile-flags: -C overflow-checks
|
// compile-flags: -C overflow-checks
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
// compile-flags: --test -C debug_assertions=yes
|
// compile-flags: --test -C debug_assertions=yes
|
||||||
// revisions: std core
|
// revisions: std core
|
||||||
|
|
||||||
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![cfg_attr(core, no_std)]
|
#![cfg_attr(core, no_std)]
|
||||||
|
|
||||||
#[cfg(std)] use std::fmt;
|
#[cfg(std)] use std::fmt;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![feature(fn_traits)]
|
#![feature(fn_traits)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-emscripten no i128 support
|
|
||||||
|
|
||||||
#![deny(const_err)]
|
#![deny(const_err)]
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
#![allow(overflowing_literals)]
|
#![allow(overflowing_literals)]
|
||||||
|
|
||||||
// ignore-emscripten i128 doesn't work
|
|
||||||
|
|
||||||
|
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// compile-flags: -C debug_assertions=yes
|
// compile-flags: -C debug_assertions=yes
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// ignore-emscripten dies with an LLVM error
|
// ignore-emscripten dies with an LLVM error
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-emscripten u128 not supported
|
|
||||||
|
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
#![deny(overflowing_literals)]
|
#![deny(overflowing_literals)]
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-emscripten u128 not supported
|
|
||||||
|
|
||||||
|
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// aux-build:wants-panic-runtime-abort.rs
|
// aux-build:wants-panic-runtime-abort.rs
|
||||||
// aux-build:panic-runtime-lang-items.rs
|
// aux-build:panic-runtime-lang-items.rs
|
||||||
// error-pattern: is not compiled with this crate's panic strategy `unwind`
|
// error-pattern: is not compiled with this crate's panic strategy `unwind`
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// error-pattern:is incompatible with this crate's strategy of `unwind`
|
// error-pattern:is incompatible with this crate's strategy of `unwind`
|
||||||
// aux-build:panic-runtime-abort.rs
|
// aux-build:panic-runtime-abort.rs
|
||||||
// aux-build:panic-runtime-lang-items.rs
|
// aux-build:panic-runtime-lang-items.rs
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// aux-build:panic-runtime-abort.rs
|
// aux-build:panic-runtime-abort.rs
|
||||||
// aux-build:wants-panic-runtime-abort.rs
|
// aux-build:wants-panic-runtime-abort.rs
|
||||||
// aux-build:panic-runtime-lang-items.rs
|
// aux-build:panic-runtime-lang-items.rs
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare always compiled as panic=abort right now and this requires unwinding
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// This test checks that instantiating an uninhabited type via `mem::{uninitialized,zeroed}` results
|
// This test checks that instantiating an uninhabited type via `mem::{uninitialized,zeroed}` results
|
||||||
// in a runtime panic.
|
// in a runtime panic.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// aux-build:expand-with-a-macro.rs
|
// aux-build:expand-with-a-macro.rs
|
||||||
|
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// aux-build:reachable-unnameable-items.rs
|
// aux-build:reachable-unnameable-items.rs
|
||||||
|
|
||||||
extern crate reachable_unnameable_items;
|
extern crate reachable_unnameable_items;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// compile-flags: --test
|
// compile-flags: --test
|
||||||
// run-pass
|
// run-pass
|
||||||
|
|
||||||
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
|
|
||||||
#![allow(dead_code, unreachable_code)]
|
#![allow(dead_code, unreachable_code)]
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
// aux-build:sepcomp_lib.rs
|
// aux-build:sepcomp_lib.rs
|
||||||
// compile-flags: -C lto -g
|
// compile-flags: -C lto -g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
// no-prefer-dynamic
|
// no-prefer-dynamic
|
||||||
|
|
||||||
extern crate sepcomp_lib;
|
extern crate sepcomp_lib;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// compile-flags: --test
|
// compile-flags: --test
|
||||||
#![feature(allow_fail)]
|
#![feature(allow_fail)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-emscripten compiled with panic=abort by default
|
||||||
// compile-flags: --test
|
// compile-flags: --test
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "foo")]
|
#[should_panic(expected = "foo")]
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
// This is a regression test for issue #17021.
|
// This is a regression test for issue #17021.
|
||||||
//
|
//
|
||||||
// compile-flags: -g
|
// compile-flags: -g
|
||||||
|
// ignore-asmjs wasm2js does not support source maps yet
|
||||||
|
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue