Persistent alternative to `addOutputDirectoryArg`

I’m generating a folder of files using addOutputDirectoryArg, when only even one file changes I reprocess all the files in the directory. Since addOutputDirectoryArg provides a fresh directory every time for one file change I’m now using .zig-cache/my_dir as the output directory so that the output path is known and stable.

Is there other better way to handle use case?

(post deleted by author)