atomictoquark wrote:

> I am not sure if this is a viable solution in the long term as LLVM don't 
> really use BOMs in the sources (a quick scan shows only 4 files with BOMs), 
> hence these changes can easily be overridden without someone noticing.
> 
> Any reason you can't configure MSVC to treat all of the LLVM sources as UTF8 ?

On Windows with chinese env,the vs cmd console's default page code is 
936(GBK),this makes the problem.if edit file 
"llvm-project\llvm\cmake\modules\AddLLVM.cmake" line 37 ,add config like this
`    elseif(MSVC)
      list(APPEND LLVM_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0)
      list(APPEND LLVM_COMPILE_FLAGS "/EHs-c-")
      list(APPEND LLVM_COMPILE_FLAGS "/utf-8")`
will solve this problem completely.
It's been a busy day,just for this problem...

https://github.com/llvm/llvm-project/pull/78085
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to