-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Upgrade Emscripten targets to use upstream LLVM backend #63649
Changes from all commits
9a55103
5b56c66
1b4d5ec
b78cc69
63955bb
43c4b81
4a4df29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1047,10 +1047,11 @@ impl Step for Compiletest { | |
// Also provide `rust_test_helpers` for the host. | ||
builder.ensure(native::TestHelpers { target: compiler.host }); | ||
|
||
// wasm32 can't build the test helpers | ||
if !target.contains("wasm32") { | ||
// As well as the target, except for plain wasm32, which can't build it | ||
if !target.contains("wasm32") || target.contains("emscripten") { | ||
builder.ensure(native::TestHelpers { target }); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure which LLVM versions rust supports, so this may not be correct. This change was necessary to uncover all the ABI problems, though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW this may fail on CI for the wasm32-unknown-unknown target, but I think that it'll probably work in that it'll generate a native library with ELF code (using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this is the line that's failing on CI, this'll need to be disabled still for wasm32-unknown-unknown I believe |
||
|
||
builder.ensure(RemoteCopyLibs { compiler, target }); | ||
|
||
let mut cmd = builder.tool_cmd(Tool::Compiletest); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
cmake \ | ||
sudo \ | ||
gdb \ | ||
xz-utils | ||
xz-utils \ | ||
bzip2 | ||
|
||
COPY scripts/emscripten.sh /scripts/ | ||
RUN bash /scripts/emscripten.sh | ||
|
@@ -20,28 +21,16 @@ COPY scripts/sccache.sh /scripts/ | |
RUN sh /scripts/sccache.sh | ||
|
||
ENV PATH=$PATH:/emsdk-portable | ||
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 PATH=$PATH:/emsdk-portable/upstream/emscripten/ | ||
ENV PATH=$PATH:/emsdk-portable/node/12.9.1_64bit/bin/ | ||
ENV BINARYEN_ROOT=/emsdk-portable/upstream/ | ||
ENV EM_CONFIG=/emsdk-portable/.emscripten | ||
|
||
ENV TARGETS=asmjs-unknown-emscripten | ||
|
||
ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests | ||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS | ||
|
||
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 | ||
# This is almost identical to the wasm32-unknown-emscripten target, so | ||
# running with assertions again is not useful | ||
ENV NO_DEBUG_ASSERTIONS=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW I think we trimmed down the tests run on the emscripten builder because of how long it took, so this may want to preserve the lack of assertions and running just a few test suites There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My hope is that with the upstream LLVM backend instead of Fastcomp the performance should be similar to that of other targets so we can give it the full testing treatment, but I'd be happy to put these limits back if that does not pan out. |
||
ENV NO_LLVM_ASSERTIONS=1 |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs (rejected hunks) | ||
@@ -483,7 +483,7 @@ mod slice_index { | ||
} | ||
|
||
#[test] | ||
- #[cfg(not(target_arch = "asmjs"))] // hits an OOM | ||
+ #[cfg(not(target_arch = "js"))] // hits an OOM | ||
#[cfg(not(miri))] // Miri is too slow | ||
fn simple_big() { | ||
fn a_million_letter_x() -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the
codegen-backends
option when you remove that.