How to set compiler option inside build.zig?

Say, I want to add -fsingle-threaded into project build.zig.
How do I do that?

It would be exe.single_threaded = true; or lib.single_threaded = true;. You can find the boat load of such options here.

3 Likes

yes, thanks.
i thought about Builder.addOptions() but it turns out to be much easier.