I’m trying to make a dump using llvm-objdump
and write the output to a file:
// dump executable
const objdump_program = try b.findProgram(&.{"llvm-objdump"}, &.{});
const objdump_run = b.addSystemCommand(&.{objdump_program, "-ds", "zig-out/bin/program"});
const objdump_step = &b.addInstallFile(objdump_run.captureStdOut(), "bin/program.dump").step;
b.getInstallStep().dependOn(objdump_step);
It worked the very first time. But it looks like the program.dump
file has been cached and is not overwritten by the new output of subsequent llvm_objdump
runs.
How do I make the program.dump
file be updated every llvm-objdump
run?