#[solved] Calling a custom compiler from build.zig for certain file types. How would it be done?
1 messages · Page 1 of 1 (latest)
const run_step = b.Step.Run.create(b, "compile stringify");
run_step.addFileArg(b.path("./build/rend2/stringify"));
run_step.addFileArg(b.path("myfile.ext"));
It doesn't seem to have an output file arg though, Run steps work better with an output file arg
minus a syntax mistake in b.Step which is std.Build.Step... it seems to not fail otherwise 🤔
but it also doesn't seem to be running it. do I need to specify that explicitly or something?
I changed it to addSystemCommand and I'm not getting it to run either 😦
I got some progress, but I'm getting the path resolved to be relative to the build.zig file
Is there a way to make it call stringify instead of ./build/stringify?
trial/error got me to addArg instead of addFileArg to declare a command that will be searched for on PATH
[solved] Calling a custom compiler from build.zig for certain file types. How would it be done?
you need to depend on the step
whatever command needs that file, .step.dependOn(&run.step)
oh you got it