Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
zig init
- add
std.log.warn("hello world", .{}); to the add function in src/root.zig
- add
lib.bundle_compiler_rt = true; lib.linkLibC(); to build.zig
zig build
- Copy the resultant library into the helloworld-c native unikraft directory (https://github.com/unikraft/catalog/tree/4219b32f3d1cd9fbaa7d50861cc1acd81bfc2362/native/helloworld-c)
- Configure and compile unikernel with
kraft build --plat qemu --arch x86_64
kraft run --plat qemu --arch x86_64
Program crashes
Expected Behavior
Program should link and run successfully, as it does when the zig library is compiled with -Doptimize=ReleaseSafe