Pass /utf-8 to MSVC so the build survives non-CP1252 host codepages. - #369
Merged
Merged
Conversation
Several BOM-less UTF-8 sources make cl.exe fall back to the system ANSI codepage; library/src/api/dds_constants.hpp line 47 holds an em dash that CP936 cannot decode, so the compile fails with C4819 escalated by /WX into C2220. English CP1252 CI runners decode those bytes without complaint, which is why the breakage only surfaces on localized Windows. The flag belongs in the //:build_windows and //:debug_build_windows select arms of DDS_CPPOPTS, not in a build:windows --cxxopt: that flag keys off the host OS and therefore also reaches wasm transitions, where clang rejects an MSVC-only flag with "no such file or directory: '/utf-8'". ci_windows_cppopts_test now guards both halves, and fails without the flag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several BOM-less UTF-8 sources make cl.exe fall back to the system ANSI codepage; library/src/api/dds_constants.hpp line 47 holds an em dash that CP936 cannot decode, so the compile fails with C4819 escalated by /WX into C2220. English CP1252 CI runners decode those bytes without complaint, which is why the breakage only surfaces on localized Windows.
The flag belongs in the //:build_windows and //:debug_build_windows select arms of DDS_CPPOPTS, not in a build:windows --cxxopt: that flag keys off the host OS and therefore also reaches wasm transitions, where clang rejects an MSVC-only flag with "no such file or directory: '/utf-8'". ci_windows_cppopts_test now guards both halves, and fails without the flag.