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

Feature more msvc flags parsed #1729

Merged

Conversation

Alexei-Barnes
Copy link
Contributor

@Alexei-Barnes Alexei-Barnes commented Apr 13, 2023

Parsing these flags improves support for caching Unreal Engine builds via sccache.

This fixes #1728.
This should improve the output for #988, but it does not add PCH support.

  • Zm can pass through. It's related to PCH, which we don't handle yet. However, Zm doesn't force creating a PCH, so it's not hard to handle independently.
  • Yc forces compiling a PCH (same as /Fp) and it's too hard right now. Adding it to too hard means better stats from the server about why it could not cache compilation.
  • sourceDependencies is identical to /deps, just a different name that some systems seem to prefer to use when construction MSVC compile commands. (Actually I can't find docs for /deps, but I can for /sourceDependencies, so there's that!)

Added tests for /Yc, /deps, and /sourceDependencies.
Zm is just a trivial passthrough, so it didn't seem worth adding a test for. Most PassThroughWithSuffix arguments don't appear to have tests.

* Zm can just pass through. It's related to PCH which we don't handle yet. However, Zm doesn't actually force creating a PCH, so it's not actually hard to handle independently.
* Yc is compile a PCH and it's too hard right now. Adding it to too hard means better stats from the server about why it could not cache compilation.
* sourceDependencies is identical to /deps, just a different name that some systems seem to prefer to use when construction MSVC compile commands.
Same flag, different name.
@Alexei-Barnes Alexei-Barnes force-pushed the feature-more-msvc-flags-supported branch from b3e9ab7 to 47db6e6 Compare April 13, 2023 10:53
@codecov-commenter
Copy link

codecov-commenter commented Apr 13, 2023

Codecov Report

Patch coverage: 56.25% and project coverage change: +0.16 🎉

Comparison is base (0af46b1) 29.33% compared to head (47db6e6) 29.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1729      +/-   ##
==========================================
+ Coverage   29.33%   29.50%   +0.16%     
==========================================
  Files          49       49              
  Lines       17056    17088      +32     
  Branches     8272     8285      +13     
==========================================
+ Hits         5004     5042      +38     
+ Misses       7000     6999       -1     
+ Partials     5052     5047       -5     
Impacted Files Coverage Δ
src/compiler/msvc.rs 45.33% <56.25%> (+0.56%) ⬆️

... and 14 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sylvestre sylvestre merged commit 39632a7 into mozilla:main Apr 24, 2023
35 of 36 checks passed
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.

Support for /sourceDependencies as a depsfile argument (MSVC)
3 participants