| author | |
| committer | |
| log | 4115f70cd3ac30027618a56976207c3bde378d85 |
| tree | 8780f1408d64c59cad90307d0dd1e72a9ff410dc |
| parent | 596d1cd5a8a2daad25df9d39ad384df1b67eb39e |
| signature | Commit is signed but in an unrecognized format. |
Disable garbage-collection for certain tests to ensure the tested
sections are being emitted.4 files changed, 7 insertions(+), 0 deletions(-)
test/link/wasm/bss/build.zig+2| ... | @@ -26,6 +26,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt | ... | @@ -26,6 +26,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt |
| 26 | lib.strip = false; | 26 | lib.strip = false; |
| 27 | // to make sure the bss segment is emitted, we must import memory | 27 | // to make sure the bss segment is emitted, we must import memory |
| 28 | lib.import_memory = true; | 28 | lib.import_memory = true; |
| 29 | lib.link_gc_sections = false; | ||
| 29 | 30 | ||
| 30 | const check_lib = lib.checkObject(); | 31 | const check_lib = lib.checkObject(); |
| 31 | 32 | ||
| ... | @@ -73,6 +74,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt | ... | @@ -73,6 +74,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt |
| 73 | lib.strip = false; | 74 | lib.strip = false; |
| 74 | // to make sure the bss segment is emitted, we must import memory | 75 | // to make sure the bss segment is emitted, we must import memory |
| 75 | lib.import_memory = true; | 76 | lib.import_memory = true; |
| 77 | lib.link_gc_sections = false; | ||
| 76 | 78 | ||
| 77 | const check_lib = lib.checkObject(); | 79 | const check_lib = lib.checkObject(); |
| 78 | check_lib.checkStart(); | 80 | check_lib.checkStart(); |
test/link/wasm/function-table/build.zig+3| ... | @@ -23,6 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -23,6 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 23 | import_table.use_llvm = false; | 23 | import_table.use_llvm = false; |
| 24 | import_table.use_lld = false; | 24 | import_table.use_lld = false; |
| 25 | import_table.import_table = true; | 25 | import_table.import_table = true; |
| 26 | import_table.link_gc_sections = false; | ||
| 26 | 27 | ||
| 27 | const export_table = b.addExecutable(.{ | 28 | const export_table = b.addExecutable(.{ |
| 28 | .name = "export_table", | 29 | .name = "export_table", |
| ... | @@ -34,6 +35,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -34,6 +35,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 34 | export_table.use_llvm = false; | 35 | export_table.use_llvm = false; |
| 35 | export_table.use_lld = false; | 36 | export_table.use_lld = false; |
| 36 | export_table.export_table = true; | 37 | export_table.export_table = true; |
| 38 | export_table.link_gc_sections = false; | ||
| 37 | 39 | ||
| 38 | const regular_table = b.addExecutable(.{ | 40 | const regular_table = b.addExecutable(.{ |
| 39 | .name = "regular_table", | 41 | .name = "regular_table", |
| ... | @@ -44,6 +46,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -44,6 +46,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 44 | regular_table.entry = .disabled; | 46 | regular_table.entry = .disabled; |
| 45 | regular_table.use_llvm = false; | 47 | regular_table.use_llvm = false; |
| 46 | regular_table.use_lld = false; | 48 | regular_table.use_lld = false; |
| 49 | regular_table.link_gc_sections = false; // Ensure function table is not empty | ||
| 47 | 50 | ||
| 48 | const check_import = import_table.checkObject(); | 51 | const check_import = import_table.checkObject(); |
| 49 | const check_export = export_table.checkObject(); | 52 | const check_export = export_table.checkObject(); |
test/link/wasm/segments/build.zig+1| ... | @@ -23,6 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -23,6 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 23 | lib.use_llvm = false; | 23 | lib.use_llvm = false; |
| 24 | lib.use_lld = false; | 24 | lib.use_lld = false; |
| 25 | lib.strip = false; | 25 | lib.strip = false; |
| 26 | lib.link_gc_sections = false; // so data is not garbage collected and we can verify data section | ||
| 26 | b.installArtifact(lib); | 27 | b.installArtifact(lib); |
| 27 | 28 | ||
| 28 | const check_lib = lib.checkObject(); | 29 | const check_lib = lib.checkObject(); |
test/link/wasm/stack_pointer/build.zig+1| ... | @@ -24,6 +24,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -24,6 +24,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 24 | lib.use_lld = false; | 24 | lib.use_lld = false; |
| 25 | lib.strip = false; | 25 | lib.strip = false; |
| 26 | lib.stack_size = std.wasm.page_size * 2; // set an explicit stack size | 26 | lib.stack_size = std.wasm.page_size * 2; // set an explicit stack size |
| 27 | lib.link_gc_sections = false; | ||
| 27 | b.installArtifact(lib); | 28 | b.installArtifact(lib); |
| 28 | 29 | ||
| 29 | const check_lib = lib.checkObject(); | 30 | const check_lib = lib.checkObject(); |