Always enforce optimization when building for MSVC
In a couple of places there's code like if(CONFIG_something) { ... }
.
On MSVC, with optimizations disabled, the supposedly-disabled blocks always
generate code, including references to functions which are not available,
causing link errors.
In other words, some level of optimization is always required to correctly
build things - so enforce optimization in all cases.
Would there be another way, should disabling optimization be really needed?
Yes - replace if(CONFIG_something) { ... }
with the matching preprocessor
check (#if CONFIG_something ... #endif
). However, this would require source
code to be touched. But I'm assuming deviating from upstream is undesirable,
hence the attempt to solve it via build flags.