Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 3 additions & 12 deletions src/tools/wasm-emscripten-finalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ int main(int argc, const char* argv[]) {
bool debugInfo = false;
bool DWARF = false;
bool sideModule = false;
bool legalizeJavaScriptFFI = true;
bool bigInt = false;
bool checkStackOverflow = false;
bool standaloneWasm = false;
Expand Down Expand Up @@ -105,15 +104,6 @@ int main(int argc, const char* argv[]) {
[&inputSourceMapFilename](Options* o, const std::string& argument) {
inputSourceMapFilename = argument;
})
.add("--no-legalize-javascript-ffi",
"-nj",
"Do not fully legalize (i64->i32, "
"f32->f64) the imports and exports for interfacing with JS",
WasmEmscriptenFinalizeOption,
Options::Arguments::Zero,
[&legalizeJavaScriptFFI](Options* o, const std::string&) {
legalizeJavaScriptFFI = false;
})
.add("--bigint",
"-bi",
"Assume JS will use wasm/JS BigInt integration, so wasm i64s will "
Expand Down Expand Up @@ -261,8 +251,9 @@ int main(int argc, const char* argv[]) {
}
}

// Legalize the wasm, if BigInts don't make that moot.
if (!bigInt && legalizeJavaScriptFFI) {
// Legalize the Wasm imports/exports, by lowing away usages of i64,
// if BigInt integration is not available.
if (!bigInt) {
passRunner.add("legalize-js-interface");
}

Expand Down
4 changes: 0 additions & 4 deletions test/lit/help/wasm-emscripten-finalize.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
;; CHECK-NEXT: --input-source-map,-ism Consume source map from the specified
;; CHECK-NEXT: file
;; CHECK-NEXT:
;; CHECK-NEXT: --no-legalize-javascript-ffi,-nj Do not fully legalize (i64->i32,
;; CHECK-NEXT: f32->f64) the imports and exports for
;; CHECK-NEXT: interfacing with JS
;; CHECK-NEXT:
;; CHECK-NEXT: --bigint,-bi Assume JS will use wasm/JS BigInt
;; CHECK-NEXT: integration, so wasm i64s will turn into
;; CHECK-NEXT: JS BigInts, and there is no need for any
Expand Down
Loading