Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cl.exe dependency tracking breaks with international languages #1766

Open
tristanlabelle opened this issue Apr 18, 2020 · 1 comment
Open

Comments

@tristanlabelle
Copy link

tristanlabelle commented Apr 18, 2020

Ninja uses cl.exe /showIncludes to figure dependencies, and then filters out the generated compiler spew from the output:

Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\IntPreview\VC\Tools\MSVC\14.26.28801\include\stdint.h

Or, for Japanese users:

メモ: インクルード ファイル: C:\Program Files (x86)\Microsoft Visual Studio\2019\IntPreview\VC\Tools\MSVC\14.26.28801\include\stdint.h

Which Ninja filters using msvc_deps_prefix.

Scenario: A user of EN-US Windows sets Visual Studio to Japanese. Visual Studio sets the VSLANG environment variable so cl.exe will produce error messages in Japanese. For Japanese characters to be preserved in the output of cl.exe, it needs to output UTF-8, which Visual Studio indicates using uses chcp 65001. However, it is then impossible to use msvc_deps_prefix to tell Ninja what the /showInclude message prefix is because rules.ninja must be encoded as ANSI, which in this scenario is the English codepage and cannot represent the Japanese characters メモ: インクルード ファイル.

The result is that Ninja's dependency tracking is broken, and the user sees the /showIncludes spew in the compiler output.

This issue would be resolved by #1671, since it would make rules.ninja utf-8 on Windows.

@tristanlabelle tristanlabelle changed the title cl.exe /showIncludes filtering breaks with international languages cl.exe dependency tracking breaks with international languages Jun 4, 2020
@jonesmz

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants