Add a [user defined build setting](https://bazel.build/extending/config#defining-build-settings) to select [Zig's build mode](https://ziglearn.org/chapter-3/#build-modes). Read the value of this setting in build rules and forward the appropriate build mode flag to the compiler.