This patch passes four additional options to MSVC when building LLVM.
These four options do not generate any new warnings, and slightly improves codegen.
The four options:
- /Zc:strictStrings (Disable string literal type conversion) prevents initializing a non-const char*/wchar_t* with a string literal
- /Zc:rvalueCast (Enforce type conversion rules) prevents nonconformant rvalue/rvalue-reference casting
- /GF (Eliminate Duplicate Strings) pools string literals, which would otherwise waste space
- /Oi (Generate Intrinsic Functions) greenlights the compiler to replace certain function calls with compiler intrinsics, where it's faster to do so.
The first three are straightforward, and I don't expect any controversy.
Generating intrinsic functions may be problematic if LLVM itself needs ANSI floating point conformance (I have no idea)
I think this one is reasonable, but I worry about it requiring use of /bigobj. What are the size differences for our executables with this option disabled vs enabled?