I want to write an IIncrementalGenerator which has slightly different behaviour depending on if the compiler is doing a release or debug build. I know you in the CsProj you have the Optimize flag which controls some optimisations.
I want to check this Optimize flag during the Initialize call so that my generated code can perform more checks and generate more aggressive code which requires a lot more checks of the assembly. This isn't needed for debug builds as a simplified version of this can be generated which isn't as precise.
How do I get the state of Optimise or debug/release configurations in the Initialize call?