File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -697,11 +697,13 @@ Input source maps can be specified by adding an -ism option right after the modu
697697 " " ,
698698 " Write a wasm-split manifest to the specified file. This manifest can "
699699 " be given to wasm-split to split the merged module along the lines of "
700- " the original modules." ,
700+ " the original modules. Implies --debuginfo to preserve function names "
701+ " in the output module." ,
701702 WasmMergeOption,
702703 Options::Arguments::One,
703- [&manifestFile ](Options* o, const std::string& argument) {
704+ [&](Options* o, const std::string& argument) {
704705 manifestFile = argument;
706+ debugInfo = true ;
705707 })
706708 .add (" --rename-export-conflicts" ,
707709 " -rec" ,
Original file line number Diff line number Diff line change 3838;; CHECK-NEXT: specified file. This manifest can be
3939;; CHECK-NEXT: given to wasm-split to split the merged
4040;; CHECK-NEXT: module along the lines of the original
41- ;; CHECK-NEXT: modules.
41+ ;; CHECK-NEXT: modules. Implies --debuginfo to preserve
42+ ;; CHECK-NEXT: function names in the output module.
4243;; CHECK-NEXT:
4344;; CHECK-NEXT: --rename-export-conflicts,-rec Rename exports to avoid conflicts (rather
4445;; CHECK-NEXT: than error)
Original file line number Diff line number Diff line change 1- ;; RUN: wasm-merge %s first %s.second second %s.third third --output-manifest %t.manifest -S - o %t.wasm
1+ ;; RUN: wasm-merge %s first %s.second second %s.third third --output-manifest %t.manifest -o %t.wasm
22;; RUN: cat %t.manifest | filecheck %s
3+ ;; RUN: wasm-dis %t.wasm -o - | filecheck %s --check-prefix MERGED
34
45;; The first module is the primary module and does not appear in the manifest.
56;; CHECK-NOT: first
1213;; CHECK-NEXT: third
1314;; CHECK-NEXT: qux
1415
16+ ;; The binary should contain the original function names.
17+ ;; MERGED: (module
18+ ;; MERGED-NEXT: (type $0 (func))
19+ ;; MERGED-NEXT: (import "env" "imported_first" (func $imported_first))
20+ ;; MERGED-NEXT: (import "env" "imported_second" (func $imported_second))
21+ ;; MERGED-NEXT: (import "env" "imported_third" (func $imported_third))
22+ ;; MERGED-NEXT: (export "foo" (func $foo))
23+ ;; MERGED-NEXT: (export "bar" (func $bar))
24+ ;; MERGED-NEXT: (export "baz" (func $baz))
25+ ;; MERGED-NEXT: (export "qux" (func $qux))
26+ ;; MERGED-NEXT: (func $foo
27+ ;; MERGED-NEXT: (call $imported_first)
28+ ;; MERGED-NEXT: )
29+ ;; MERGED-NEXT: (func $bar
30+ ;; MERGED-NEXT: (nop)
31+ ;; MERGED-NEXT: )
32+ ;; MERGED-NEXT: (func $baz
33+ ;; MERGED-NEXT: (call $imported_second)
34+ ;; MERGED-NEXT: )
35+ ;; MERGED-NEXT: (func $qux
36+ ;; MERGED-NEXT: (call $imported_third)
37+ ;; MERGED-NEXT: )
38+ ;; MERGED-NEXT: )
39+
1540(module
1641 (import " env" " imported_first" (func $imported_first ))
1742 (func $foo (export " foo" )
You can’t perform that action at this time.
0 commit comments