[PATCH] D157986: [Cmake] Make sure MSVC knows LLVM source files are UTF-8 encoded

Corentin Jabot via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 13:01:56 PDT 2023


cor3ntin updated this revision to Diff 550440.
cor3ntin added a comment.

Trying to set the execution charset too just to see how the bot reacts.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157986/new/

https://reviews.llvm.org/D157986

Files:
  llvm/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -489,6 +489,9 @@
     _UNICODE
   )
 
+  # Tell MSVC the LLVM sources are UTF-8 encoded.
+  append("/utf-8" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
   if (LLVM_WINSYSROOT)
     if (NOT CLANG_CL)
       message(ERROR "LLVM_WINSYSROOT requires clang-cl")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157986.550440.patch
Type: text/x-patch
Size: 461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230815/7a78a470/attachment.bin>


More information about the llvm-commits mailing list