]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #55845 - nikic:emscripten-clamp-mode, r=alexcrichton
authorkennytm <kennytm@gmail.com>
Sun, 11 Nov 2018 04:33:50 +0000 (12:33 +0800)
committerkennytm <kennytm@gmail.com>
Sun, 11 Nov 2018 04:33:50 +0000 (12:33 +0800)
commitd0b68c0dde4904d597c20dc6991b3ddaec023b1e
tree94b26bbda8d4f6e496f6ee8cdaac6bacf1189e62
parent75e920f847557acef9b6f5425262ea5dc72ed685
parent48aa60254863a6c495340e2f1b753f7b9a45a9d0
Rollup merge of #55845 - nikic:emscripten-clamp-mode, r=alexcrichton

Set BINARYEN_TRAP_MODE=clamp

This fixes the wasm32-unknown-emscripten test failure mentioned in https://github.com/rust-lang/rust/pull/55626#issuecomment-437084774, by making binaryen operate in clamp rather than trap mode.

The issue is that the current `-Zsaturating-float-casts` implementation uses `fpto[us]i` unconditionally (and selects afterwards), which does not work with trapping implementations of fpto[su]i, which emscripten uses by default.

I've left a FIXME to drop this flag once we have a better solution for saturating casts on the LLVM side.
;