| 1 |
// SPDX-License-Identifier: MPL-2.0 |
| 2 |
// (c) Hare authors <https://harelang.org> |
| 3 |
|
| 4 |
@symbol("__test_main") fn test_main() size; |
| 5 |
|
| 6 |
@symbol("__init_array_start") const init_start: [*]*fn() void; |
| 7 |
@symbol("__init_array_end") const init_end: [*]*fn() void; |
| 8 |
@symbol("__fini_array_start") const fini_start: [*]*fn() void; |
| 9 |
@symbol("__fini_array_end") const fini_end: [*]*fn() void; |
| 10 |
|
| 11 |
export fn start_ha() never = { |
| 12 |
init(); |
| 13 |
const nfail = test_main(); |
| 14 |
fini(); |
| 15 |
exit(if (nfail > 0) 1 else 0); |
| 16 |
}; |