Skip to content

Commit bc1205e

Browse files
authored
Enable nontrapping-fptoint feature while invoking wasm-opt (#543)
See rust-lang/rust#137322 Signed-off-by: godvino <[email protected]>
1 parent 38b9ec7 commit bc1205e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ disable-erase-components = false
230230

231231
# Enabling wasm-opt features
232232
#
233-
# Optional. By default, "-Oz" and "--enable-bulk-memory" are used. For all features, consult `wasm-opt --help`.
233+
# Optional. By default, "-Oz", "--enable-bulk-memory" and "--enable-nontrapping-float-to-int" are used. For all features, consult `wasm-opt --help`.
234234
# By providing features, you will override the default enabled features.
235-
wasm-opt-features = ["-Oz","--enable-bulk-memory"]
235+
wasm-opt-features = ["-Oz","--enable-bulk-memory","--enable-nontrapping-float-to-int"]
236236
```
237237

238238
## Site parameters

src/compile/front.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async fn optimize(proj: &Project, file: &Utf8Path) -> Result<()> {
225225
let mut args: Vec<&str> = if let Some(features) = &proj.wasm_opt_features {
226226
features.iter().map(|f| f.as_str()).collect()
227227
} else {
228-
vec!["-Oz", "--enable-bulk-memory"]
228+
vec!["-Oz", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]
229229
};
230230
args.extend_from_slice(&[file.as_str(), "-o", file.as_str()]);
231231

0 commit comments

Comments
 (0)