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

fix: sccache does not generate new object file if "-gsplit-dwarf" is enabled and the filename or directory of the object is changed #2264

Closed zhouronghua closed 1 month ago

zhouronghua commented 1 month ago

when output dir changed, and -g -gsplit-dwarf is enabled, new object file should be gererated, but not old cached object.

case:

1 echo "int test(){}" > test.cc

2 mkdir o1 o2

3 sccache g++ -c -g -gsplit-dwarf test.cc -o o1/test.o

4 sccache -z

5 sccache g++ -c -g -gsplit-dwarf test.cc -o o2/test.o

6 strings o2/test.o |grep o2/test.dwo

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 40.60%. Comparing base (0cc0c62) to head (0e3db1b). Report is 78 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/gcc.rs 16.66% 0 Missing and 5 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2264 +/- ## ========================================== + Coverage 30.91% 40.60% +9.69% ========================================== Files 53 54 +1 Lines 20112 20713 +601 Branches 9755 9630 -125 ========================================== + Hits 6217 8410 +2193 - Misses 7922 8142 +220 + Partials 5973 4161 -1812 ```

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

sylvestre commented 1 month ago

the patch doesn't apply and what is "INF-2296" ? :)

sylvestre commented 1 month ago

the patch has nothing to do with split dwarf. please reopen when it is fixed

zhouronghua commented 1 month ago

sorry for I have not replied in holiday.

I didn't find way to reopen the PULL REQUEST, so I create another PR in https://github.com/mozilla/sccache/pull/2264