From 96f1a89a2bb007b7dbe5ccc613a0fa3f8dd323dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=88=98=E9=9B=A8=E5=9F=B9?= Date: Fri, 3 Nov 2017 04:06:00 +0800 Subject: [PATCH] Switch to /utf-8 for MSVC (#14822) * Add /source-charset:utf-8 to force MSVC to compile source as UTF-8. * Fix the illegal character in siginfo.cpp. --- compileoptions.cmake | 1 + src/vm/siginfo.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compileoptions.cmake b/compileoptions.cmake index 9f9f28eaf5..6f9d55fa33 100644 --- a/compileoptions.cmake +++ b/compileoptions.cmake @@ -94,6 +94,7 @@ if (WIN32) add_compile_options(/wd4960 /wd4961 /wd4603 /wd4627 /wd4838 /wd4456 /wd4457 /wd4458 /wd4459 /wd4091 /we4640) add_compile_options(/Zi) # enable debugging information add_compile_options(/ZH:SHA_256) # use SHA256 for generating hashes of compiler processed source files. + add_compile_options(/source-charset:utf-8) # Force MSVC to compile source as UTF-8. if (CLR_CMAKE_PLATFORM_ARCH_I386) add_compile_options(/Gz) diff --git a/src/vm/siginfo.cpp b/src/vm/siginfo.cpp index 40a55cb6f0..be919c8b7e 100644 --- a/src/vm/siginfo.cpp +++ b/src/vm/siginfo.cpp @@ -4969,7 +4969,7 @@ void ReportByRefPointersFromByRefLikeObject(promote_func *fn, ScanContext *sc, P } // TODO: GetApproxFieldTypeHandleThrowing may throw. This is a potential stress problem for fragile NGen of non-CoreLib - // assemblies. It won’t ever throw for CoreCLR with R2R. Figure out if anything needs to be done to deal with the + // assemblies. It won't ever throw for CoreCLR with R2R. Figure out if anything needs to be done to deal with the // exception. PTR_MethodTable pFieldMT = pFD->GetApproxFieldTypeHandleThrowing().AsMethodTable(); if (!pFieldMT->IsByRefLike()) -- 2.34.1