How to manage kernel compilation manually

Good afternoon!
As I understand it, the kernel compilation takes place during the call of the .build() method, which looks as follows:

cl::Program program(context, source);
program.build(default_device, "OpenCL_optimization_options_from_specification");

But the thing is that the optimization options given in the spec are not able to meet my real needs - they are too abstract. For example, the -cl-opt-disable flag works and does not work.
In this connection, I have a question - how does the .build() method work? What exactly does it do in the source code (which I could not find (apparently, OpenCL is not so open))? And, most importantly, how can I manually communicate with the .cl code compiler to pass it compilation flags rather than optimization options?
I should note that I’m running on NVidia graphics cards (RTX 4080 and A100), so I’m mainly interested in answers and advice on how the .build() method works in relation to the NVidia infrastructure.
P.S. I am also aware of the `.compile()’ method, however it does not work. No matter what parameters I supply, nothing changes (even knowingly wrong ones).