Commit 253ed6c
authored
[wasm-split] Set import namespace only when given in multi-split (#7966)
Currently, in the case of two-way split, we set `config.importNamespace`
only when `--import-namespace` option is given, and otherwise just use
the default namespace "primary". But in the case of multi split, we set
it regardless of whether the option is given, resulting in the ""
namespace when no option is given.
The default import namespace for multi-split was "" when the multi-split
function was first added (#6943), so I'm not sure whether this
difference was intentional.
https://github.com/WebAssembly/binaryen/blob/a9a7f91eb8a65d508873bae3019a7279be4fbb14/src/tools/wasm-split/wasm-split.cpp#L419
In case it wasn't, I think it makes sense to be consistent between
two-way split and multi-split. So this in effect changes the import
namespace in multi split tests from "" to `primary`.
This also factors out the part that moves `WasmSplitOptions` into
`Config` to a function.1 parent dd4dc47 commit 253ed6c
File tree
5 files changed
+33
-28
lines changed- src/tools/wasm-split
- test/lit
- help
- wasm-split
5 files changed
+33
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
| |||
329 | 339 | | |
330 | 340 | | |
331 | 341 | | |
| 342 | + | |
332 | 343 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | 344 | | |
337 | 345 | | |
338 | 346 | | |
339 | 347 | | |
340 | 348 | | |
341 | 349 | | |
342 | | - | |
343 | | - | |
344 | 350 | | |
345 | 351 | | |
346 | 352 | | |
| |||
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
| 407 | + | |
| 408 | + | |
401 | 409 | | |
402 | 410 | | |
403 | 411 | | |
| |||
436 | 444 | | |
437 | 445 | | |
438 | 446 | | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | 447 | | |
443 | 448 | | |
444 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
0 commit comments