FIX:Adding the utf8 compilation option can fix this debug jump issue.#17682
Conversation
|
Hi @ggerganov, |
|
We already set the compile options for MSVC here: Lines 53 to 60 in a2b0fe8 Does this not work? |
Currently, the UTF-8 compilation options set in the llama.cpp project work for the ggml project. However, if I compile the ggml project separately from the llama.cpp project, the problem I described occurs. In the CONTRIBUTING.md file of the ggml project, I noticed: "For changes to the core ggml library (including to the CMake build system), please open a PR in https://github.com/ggml-org/llama.cpp. Doing so will make your PR more visible, better tested, and more likely to be reviewed." Therefore, I submitted this PR to the llama.cpp project. |
|
When you have time, could you please advise whether:
|
Make sure to read the contributing guidelines before submitting a PR
If you compile a ggml project separately on a Windows platform, you may encounter misalignment issues when debugging the Debug configuration code in a non-English system locale. This is because the Visual Studio compiler (CL.exe) may incorrectly parse the number of bytes occupied by characters (such as Chinese characters) when encountering a "UTF-8 file without BOM" in a non-English system locale. This causes the compiler to think that the end of a line of code is inconsistent with the position you see.
I renamed the helper function from disable_msvc_warnings to configure_msvc_target. Since this function now handles encoding (/utf-8) in addition to warnings, the new name better reflects its purpose.