-
Notifications
You must be signed in to change notification settings - Fork 851
Add a --standalone-wasm flag to wasm-emscripten-finalize #2333
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
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
dfdaef9
Add a --wasi flag to wasm-emscripten-finalize, which prevents extra J…
kripken c0fab8c
format
kripken b422494
fix typo
kripken b031c96
Merge remote-tracking branch 'origin/master' into wasi2
kripken 86c9685
Merge remote-tracking branch 'origin/master' into wasi2
kripken 827d962
rename flag to pure-wasm
kripken 21b570d
pure => standalone
kripken 67cd41a
formatting
kripken 39a2485
fix tests
kripken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| (module | ||
| (memory $0 2) | ||
| (table $0 1 1 funcref) | ||
| (elem (i32.const 0) $foo) | ||
| (global $global$0 (mut i32) (i32.const 66112)) | ||
| (global $global$1 i32 (i32.const 66112)) | ||
| (global $global$2 i32 (i32.const 576)) | ||
| (export "memory" (memory $0)) | ||
| (export "main" (func $main)) | ||
| (export "__heap_base" (global $global$1)) | ||
| (export "__data_end" (global $global$2)) | ||
| (func $__original_main (result i32) | ||
| (nop) | ||
| ) | ||
| (func $main (param $0 i32) (param $1 i32) (result i32) | ||
| (call $__original_main) | ||
| ) | ||
| (func $foo (result i32)) | ||
| ) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| (module | ||
| (type $FUNCSIG$i (func (result i32))) | ||
| (type $FUNCSIG$iii (func (param i32 i32) (result i32))) | ||
| (memory $0 2) | ||
| (table $0 1 1 funcref) | ||
| (elem (i32.const 0) $foo) | ||
| (global $global$0 (mut i32) (i32.const 66112)) | ||
| (global $global$1 i32 (i32.const 66112)) | ||
| (global $global$2 i32 (i32.const 576)) | ||
| (export "memory" (memory $0)) | ||
| (export "main" (func $main)) | ||
| (export "__heap_base" (global $global$1)) | ||
| (export "__data_end" (global $global$2)) | ||
| (export "stackSave" (func $stackSave)) | ||
| (export "stackAlloc" (func $stackAlloc)) | ||
| (export "stackRestore" (func $stackRestore)) | ||
| (export "__growWasmMemory" (func $__growWasmMemory)) | ||
| (export "_start" (func $_start)) | ||
| (func $__original_main (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
| (nop) | ||
| ) | ||
| (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) | ||
| (call $__original_main) | ||
| ) | ||
| (func $foo (; 2 ;) (type $FUNCSIG$i) (result i32) | ||
| (nop) | ||
| ) | ||
| (func $stackSave (; 3 ;) (result i32) | ||
| (global.get $global$0) | ||
| ) | ||
| (func $stackAlloc (; 4 ;) (param $0 i32) (result i32) | ||
| (local $1 i32) | ||
| (global.set $global$0 | ||
| (local.tee $1 | ||
| (i32.and | ||
| (i32.sub | ||
| (global.get $global$0) | ||
| (local.get $0) | ||
| ) | ||
| (i32.const -16) | ||
| ) | ||
| ) | ||
| ) | ||
| (local.get $1) | ||
| ) | ||
| (func $stackRestore (; 5 ;) (param $0 i32) | ||
| (global.set $global$0 | ||
| (local.get $0) | ||
| ) | ||
| ) | ||
| (func $__growWasmMemory (; 6 ;) (param $newSize i32) (result i32) | ||
| (memory.grow | ||
| (local.get $newSize) | ||
| ) | ||
| ) | ||
| (func $_start (; 7 ;) | ||
| (drop | ||
| (call $main | ||
| (i32.const 0) | ||
| (i32.const 0) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| (; | ||
| --BEGIN METADATA -- | ||
| { | ||
| "staticBump": 8, | ||
| "tableSize": 1, | ||
| "declares": [ | ||
| ], | ||
| "externs": [ | ||
| ], | ||
| "implementedFunctions": [ | ||
| "_main", | ||
| "_stackSave", | ||
| "_stackAlloc", | ||
| "_stackRestore", | ||
| "___growWasmMemory", | ||
| "__start" | ||
| ], | ||
| "exports": [ | ||
| "main", | ||
| "stackSave", | ||
| "stackAlloc", | ||
| "stackRestore", | ||
| "__growWasmMemory", | ||
| "_start" | ||
| ], | ||
| "namedGlobals": { | ||
| "__heap_base" : "66112", | ||
| "__data_end" : "576" | ||
| }, | ||
| "invokeFuncs": [ | ||
| ], | ||
| "features": [ | ||
| ], | ||
| "mainReadsParams": 0 | ||
| } | ||
| -- END METADATA -- | ||
| ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| (module | ||
| (memory $0 2) | ||
| (global $global$0 (mut i32) (i32.const 66112)) | ||
| (global $global$1 i32 (i32.const 66112)) | ||
| (global $global$2 i32 (i32.const 576)) | ||
| (export "memory" (memory $0)) | ||
| (export "main" (func $main)) | ||
| (export "__heap_base" (global $global$1)) | ||
| (export "__data_end" (global $global$2)) | ||
| (func $__original_main (param $0 i32) (param $1 i32) (result i32) | ||
| (nop) | ||
| ) | ||
| (func $main (param $0 i32) (param $1 i32) (result i32) | ||
| (call $__original_main (local.get $0) (local.get $1)) | ||
| ) | ||
| ) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| (module | ||
| (type $FUNCSIG$iii (func (param i32 i32) (result i32))) | ||
| (memory $0 2) | ||
| (global $global$0 (mut i32) (i32.const 66112)) | ||
| (global $global$1 i32 (i32.const 66112)) | ||
| (global $global$2 i32 (i32.const 576)) | ||
| (export "memory" (memory $0)) | ||
| (export "main" (func $main)) | ||
| (export "__heap_base" (global $global$1)) | ||
| (export "__data_end" (global $global$2)) | ||
| (export "stackSave" (func $stackSave)) | ||
| (export "stackAlloc" (func $stackAlloc)) | ||
| (export "stackRestore" (func $stackRestore)) | ||
| (export "__growWasmMemory" (func $__growWasmMemory)) | ||
| (export "_start" (func $_start)) | ||
| (func $__original_main (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) | ||
| (nop) | ||
| ) | ||
| (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) | ||
| (call $__original_main | ||
| (local.get $0) | ||
| (local.get $1) | ||
| ) | ||
| ) | ||
| (func $stackSave (; 2 ;) (result i32) | ||
| (global.get $global$0) | ||
| ) | ||
| (func $stackAlloc (; 3 ;) (param $0 i32) (result i32) | ||
| (local $1 i32) | ||
| (global.set $global$0 | ||
| (local.tee $1 | ||
| (i32.and | ||
| (i32.sub | ||
| (global.get $global$0) | ||
| (local.get $0) | ||
| ) | ||
| (i32.const -16) | ||
| ) | ||
| ) | ||
| ) | ||
| (local.get $1) | ||
| ) | ||
| (func $stackRestore (; 4 ;) (param $0 i32) | ||
| (global.set $global$0 | ||
| (local.get $0) | ||
| ) | ||
| ) | ||
| (func $__growWasmMemory (; 5 ;) (param $newSize i32) (result i32) | ||
| (memory.grow | ||
| (local.get $newSize) | ||
| ) | ||
| ) | ||
| (func $_start (; 6 ;) | ||
| (drop | ||
| (call $main | ||
| (i32.const 0) | ||
| (i32.const 0) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| (; | ||
| --BEGIN METADATA -- | ||
| { | ||
| "staticBump": 8, | ||
| "tableSize": 0, | ||
| "declares": [ | ||
| ], | ||
| "externs": [ | ||
| ], | ||
| "implementedFunctions": [ | ||
| "_main", | ||
| "_stackSave", | ||
| "_stackAlloc", | ||
| "_stackRestore", | ||
| "___growWasmMemory", | ||
| "__start" | ||
| ], | ||
| "exports": [ | ||
| "main", | ||
| "stackSave", | ||
| "stackAlloc", | ||
| "stackRestore", | ||
| "__growWasmMemory", | ||
| "_start" | ||
| ], | ||
| "namedGlobals": { | ||
| "__heap_base" : "66112", | ||
| "__data_end" : "576" | ||
| }, | ||
| "invokeFuncs": [ | ||
| ], | ||
| "features": [ | ||
| ], | ||
| "mainReadsParams": 1 | ||
| } | ||
| -- END METADATA -- | ||
| ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| (module | ||
| (memory $0 2) | ||
| (global $global$0 (mut i32) (i32.const 66112)) | ||
| (global $global$1 i32 (i32.const 66112)) | ||
| (global $global$2 i32 (i32.const 576)) | ||
| (export "memory" (memory $0)) | ||
| (export "__heap_base" (global $global$1)) | ||
| (export "__data_end" (global $global$2)) | ||
| (func $__original_main (param $0 i32) (param $1 i32) (result i32) | ||
| (nop) | ||
| ) | ||
| ) | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.