Skip to content

Commit

Permalink
Switch to /utf-8 for MSVC (dotnet#14822)
Browse files Browse the repository at this point in the history
* Add /source-charset:utf-8 to force MSVC to compile source as UTF-8.

* Fix the illegal character in siginfo.cpp.
  • Loading branch information
LYP951018 authored and jkotas committed Nov 2, 2017
1 parent 7dc0f27 commit 96f1a89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions compileoptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/vm/siginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 96f1a89

Please sign in to comment.