Skip to content

Comments

msvc: handle '/FoRelease\' command-line argument#2482

Merged
sylvestre merged 1 commit intomozilla:mainfrom
jimis:Forelease-gh1687
Nov 12, 2025
Merged

msvc: handle '/FoRelease\' command-line argument#2482
sylvestre merged 1 commit intomozilla:mainfrom
jimis:Forelease-gh1687

Conversation

@jimis
Copy link
Contributor

@jimis jimis commented Nov 6, 2025

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 #1687 #1844.

Edit: This pull request is basically #1836 rebased and changed minimally to pass all tests. The changes are:

  • Enable the test only on Windows
  • Fix style

The "author" header in the commit preserves the author of the original pull request.

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-commenter
Copy link

codecov-commenter commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 80.55556% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.15%. Comparing base (764daee) to head (96ee0de).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/msvc.rs 80.55% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2482   +/-   ##
=======================================
  Coverage   71.14%   71.15%           
=======================================
  Files          64       64           
  Lines       35207    35242   +35     
=======================================
+ Hits        25047    25075   +28     
- Misses      10160    10167    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jimis
Copy link
Contributor Author

jimis commented Nov 6, 2025

I think codecov is confused. The lines it's reporting as uncovered, are lines inside the test.

@exoosh
Copy link
Contributor

exoosh commented Nov 10, 2025

I tested this and it works great. Thank you.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sccache places object file at different location compared to cl.exe and causes link failure when @rsp file is used

4 participants