How do i tell zig (either at the command-line or in my build.zig file to create/generate/save an IR file corresponding to my program?
Right now, I'm able to "disassemble" the .elf file -- but would like something a little higher-level.
How do i tell zig (either at the command-line or in my build.zig file to create/generate/save an IR file corresponding to my program?
Right now, I'm able to "disassemble" the .elf file -- but would like something a little higher-level.
You can do the following inside your build script-
After running
zig build, the generated LLVM IR inzig-out/my_exe.llIf you want to get the assembly file, just replace
exe.getEmittedLlvmIr()withexe.getEmittedAsm()!