Index: C:/LLVM/llvm/cmake/modules/HandleLLVMOptions.cmake =================================================================== --- C:/LLVM/llvm/cmake/modules/HandleLLVMOptions.cmake +++ C:/LLVM/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -363,6 +363,19 @@ append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + if(MSVC14) + # Disable string literal const->non-const type conversion + # "When specified, the compiler requires strict const-qualification + # conformance for pointers initialized by using string literals." + append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + endif(MSVC14) + + # Generate Intrinsic Functions + append("/Oi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + + # Enforce type conversion rules + append("/Zc:rvalueCast" CMAKE_CXX_FLAGS) + # Disable sized deallocation if the flag is supported. MSVC fails to compile # the operator new overload in User otherwise. check_c_compiler_flag("/WX /Zc:sizedDealloc-" SUPPORTS_SIZED_DEALLOC)