Closed zhouronghua closed 1 week ago
Attention: Patch coverage is 94.11765%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 40.85%. Comparing base (
0cc0c62
) to head (baca926
). Report is 85 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
src/compiler/gcc.rs | 66.66% | 0 Missing and 2 partials :warning: |
tests/system.rs | 97.77% | 0 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Could you please add a test to make sure we don't regress in the future? thanks
"test_parse_arguments_split_dwarf" this case has been modified to make it work all the time
this isn't enough. I would like to see a test reproducing:
echo "int test(){}" > test.cc
mkdir o1 o2
sccache g++ -c -g -gsplit-dwarf test.cc -o o1/test.o
sccache g++ -c -g -gsplit-dwarf test.cc -o o2/test.o
strings o2/test.o |grep o2/test.dwo
also, you didn't updated the clang.rs file, is that expected ?
ok, I will add another test for it, but it need time.
parse_arguments in clang.rs will call parse_arguments in gcc.rs, so no need to change them all.
see https://github.com/mozilla/sccache/blob/main/tests/system.rs for example
thanks, that's really help.
Needs rustfmt
done
Thanks
When output dir changed, and -g -gsplit-dwarf is enabled, because the object file have link to the dwo file (include directories), the new object file should be gererated, but not old cached object. In this patch, we add a new precompile macro, for example, "-D_gsplit_dwarf_path=foo.dwo", to force sccache to generate new object file depend on the output directories.
we can check if it work by this case: case:
The new o2/test.o should contains new link to o2/test.dwo, but not cached o1/test.dwo