mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.85k stars 552 forks source link

Simplify Xcode CI / Docs #2266

Closed scoopr closed 1 month ago

scoopr commented 1 month ago

I happened to stumble upon the C_COMPILER_LAUNCHER Xcode attribute, which fits the bill perfectly, so use that instead.

scoopr commented 1 month ago

Meh, just as we got the #2257 merged, some Xcode warning exposes that it supports C_COMPILER_LAUNCHER attribute, which is a lot simpler than the wrapper script

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 40.62%. Comparing base (0cc0c62) to head (dc91279). Report is 81 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/gcc.rs 0.00% 1 Missing and 1 partial :warning:
src/compiler/compiler.rs 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2266 +/- ## ========================================== + Coverage 30.91% 40.62% +9.71% ========================================== Files 53 54 +1 Lines 20112 20734 +622 Branches 9755 9637 -118 ========================================== + Hits 6217 8423 +2206 - Misses 7922 8148 +226 + Partials 5973 4163 -1810 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

scoopr commented 1 month ago

Aha, but actually now it enables the response file use, so that needs to be disabled, I was a bit hasty on this PR, it needs a bit more work to be correct.

scoopr commented 1 month ago

Alright, when using C_COMPILER_LAUNCHER, instead of wrapper script for CC, it seems to be passing a bit more flags (as it knows the compiler better), So I added it to passthrough the -ivfstatcache path. Also noticed a single -x objective-c++-header from my project, so went ahead and added that as supported too.

I think it is much better like this.

scoopr commented 1 month ago

Just a friendly poke, was there any concerns here?

sylvestre commented 1 month ago

nope, thanks for the ping :)