msvc: fix detect_showincludes_prefix when VS_UNICODE_OUTPUT is set#2483
msvc: fix detect_showincludes_prefix when VS_UNICODE_OUTPUT is set#2483exoosh wants to merge 4 commits intomozilla:mainfrom
Conversation
MSBuild may provide as output file (/Fo) plus a folder ending with a
trailing backslash, for example /FoRelease\.
msvc detects this case and chooses {folder}/{input_file_name}.obj as
output file. For example, for /cfoo.c /FoRelease\, the expected output
path (by linker and msbuild) is Release/foo.obj.
Fixes mozilla#1687 mozilla#1844.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2483 +/- ##
===========================================
- Coverage 71.14% 27.87% -43.27%
===========================================
Files 64 54 -10
Lines 35207 33494 -1713
===========================================
- Hits 25047 9338 -15709
- Misses 10160 24156 +13996 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Trying to tend to the failed checks. It also turns out that this fix does not address #1830 for me on VS2022 with cl.exe 19.43.34810, @AudranDoublet. But your finding certainly is an excellent starting point for me to investigate further. |
5b3675f to
c28a5aa
Compare
c28a5aa to
0259e04
Compare
|
Will rebase against |
…e CreateProcessW is missing (mozilla#2484)
0259e04 to
e2c6d31
Compare
e2c6d31 to
2f2e1f9
Compare
|
most of the jobs are failing |
The problem usually occurs when VS_UNICODE_OUTPUT is set. This is a @AudranDoublet mozilla#1835 and @exoosh mozilla#2483 fixes with working tests: thank you! Should fix issues mozilla#1830 and mozilla#909
The problem usually occurs when VS_UNICODE_OUTPUT is set. This is a @AudranDoublet mozilla#1835 and @exoosh mozilla#2483 fixes with working tests: thank you! Should fix issues mozilla#1830 and mozilla#909
The problem usually occurs when VS_UNICODE_OUTPUT is set. This is a @AudranDoublet mozilla#1835 and @exoosh mozilla#2483 fixes with working tests: thank you! Should fix issues mozilla#1830 and mozilla#909
The problem usually occurs when VS_UNICODE_OUTPUT is set. This is a @AudranDoublet mozilla#1835 and @exoosh mozilla#2483 fixes with working tests: thank you! Should fix issues mozilla#1830 and mozilla#909
The problem usually occurs when VS_UNICODE_OUTPUT is set. This is a @AudranDoublet mozilla#1835 and @exoosh mozilla#2483 fixes with working tests: thank you! Should fix issues mozilla#1830 and mozilla#909
This reintroduces #1835 (FYI: @AudranDoublet). Copying the details over here:
VS_UNICODE_OUTPUTis set by Visual Studio to a value that tells MS tools running from within the IDE where to send their output. Thus,cl.exeinvocation used to retrieve the/showIncludesprefix returns an empty output when this variable is set to a valid value.The proposed fix is to use
/Eoption that tellscl.exeto output file content in stdout and retrieved headers in stderr. When set,cl.exeignores the value ofVS_UNICODE_OUTPUT.Another fix could be to explicitly unset
VS_UNICODE_OUTPUTin the command invocation.#1830 #909 mentioning these issues as it may fix them.