Use correct compiler flags in MSVC bootstrap builds of Zig
https://github.com/ziglang/zig/issues/4877
The CMake build of Zig from C++ uses hand-set compiler flags which are
not compatible with the Microsoft C/C++ Optimizing Compiler (cl.exe)
used by Visual Studio.
This commit attempts to conform them to match the Clang/GCC options
under MSVC builds.
Note that CL does not have a concept of C99 or "-O3", and may imply
other optimizations in "/O2" than are implied by Clang/GCC "-O3".
Visual Studio 2019 documentation for cl.exe's optimization options:
https://docs.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code?view=vs-2019
Visual Studio 2019 doc for cl.exe's C++ standard options:
https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019
9bb76f8ce0Bodie Solomon committed on 3/31/2020, 6:23:34 PM· committed by Andrew Kelleyparentd34a3c6