Skip to content

MSVC Features - #987

Closed
orgads wants to merge 6 commits into
ccache:masterfrom
orgads:msvc
Closed

orgads wants to merge 6 commits into
ccache:masterfrom
orgads:msvc

Conversation

@orgads

@orgads orgads commented Jan 7, 2022

Copy link
Copy Markdown
Contributor

This is a rebased version of #952.

Hope I got it right.

@orgads orgads mentioned this pull request Jan 7, 2022
@orgads
orgads force-pushed the msvc branch 2 times, most recently from c35ff3d to 08afcd1 Compare January 7, 2022 13:02
@cristianadam

Copy link
Copy Markdown
Contributor

My commit should already be merged. I don't know why it's being referenced. See #506

@orgads
orgads force-pushed the msvc branch 2 times, most recently from c534c53 to 9dccf6b Compare January 7, 2022 13:08
@orgads

orgads commented Jan 7, 2022 •

Copy link
Copy Markdown
Contributor Author

My commit should already be merged. I don't know why it's being referenced. See #506

It looks like there are some changes here (additional flags supported with / and not only -). Maybe this was a preliminary revision of your commit? Should I omit this commit?

@cristianadam

Copy link
Copy Markdown
Contributor

My commit should already be merged. I don't know why it's being referenced. See #506

It looks like there are some changes here (additional flags supported with / and not only -). Maybe this was a preliminary revision of your commit? Should I omit this commit?

It creates a bit of confusion. But having both / and - is a good thing. The commit should have a different commit message.

orgads and others added 6 commits January 7, 2022 15:23
This more or less maps to PCH support for GCC/Clang, just handle
the /Yu and /Fp options.

Note that MSVC is apparently unable to generate the same PCH
from the same sources, just like GCC, so a rebuild that also rebuilds
the PCH will get cache misses. So either somebody can add support
for -Yc (if caching those huge PCHs is a good idea), or
CCACHE_PCH_EXTSUM can be used (with a checksum based on preprocessed
PCH input, i.e. -E instead of -c -Yc).
Based on -showIncludes, which prints included files on stdout
with a certain text prefix. Otherwise pretty similar to depend mode
handling for GCC.
This makes MSVC building way faster.
Without this, clang-cl is detected as clang and then ccache barfs
because clang-cl produces stdout output.
Since clang-cl is technically sort of cl and and sort of clang,
add is_compiler_group_cl() and is_compiler_group_clang() to check
similar compilers easily instead of enumerating them repeatedly.
While MSVC technically has that option as deprecated, it's a source
of trouble with the way ccache curently handles the option, and since
it broke ccache's debug output, it was hard to find.
@orgads

orgads commented Jan 7, 2022

Copy link
Copy Markdown
Contributor Author

Done

@cristianadam

Copy link
Copy Markdown
Contributor

With this PR we can then update the page at https://ccache.dev/platform-compiler-language-support.html.

  • cl is supported
  • clang-cl is also supported

@jrosdahl jrosdahl changed the title MSVC Features #2 MSVC Features Jan 10, 2022
@jrosdahl jrosdahl added the issue: feature New feature label Jan 10, 2022
@jrosdahl

jrosdahl commented Jan 10, 2022 •

Copy link
Copy Markdown
Member

Thanks for driving the MSVC features forward.

However, as mentioned in #952 (comment), I would prefer not to review and merge the features in a single PR.

Also note It looks like there are some changes here (additional flags supported with / and not only -)

The special handling of the / version of the options is obsolete as of #954.

@orgads

orgads commented Jan 10, 2022

Copy link
Copy Markdown
Contributor Author

Regarding the /, I thought so, but didn't know where to look. Thanks for the reference :)

I'll split the other commits.

@orgads orgads closed this Feb 3, 2022
@jrosdahl jrosdahl added the status: won't fix Will not fix/implement/merge label Feb 3, 2022
@orgads
orgads deleted the msvc branch February 7, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

issue: feature New feature status: won't fix Will not fix/implement/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants