Skip to content

Wrong dependencies stored in -MF output on cache hit #2321

@glandium

Description

@glandium

STR:

  • Create two identical source files with a different name. Empty files will do: touch foo.c bar.c
  • Compile them both: sccache gcc -o foo.o -c foo.c -MD -MF foo.deps ; sccache gcc -o bar.o -c bar.c -MD -MF bar.deps
  • Look at the contents of bar.deps. It contains foo.o: foo.c /usr/include/stdc-predef.h instead of bar.o: bar.c /usr/include/stdc-predef.h.

Ironically, the preprocessor outputs a proper bar.deps as it's supposed to, but sccache overwrites it. That last part must be a recent-ish change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions