]> git.ipfire.org Git - thirdparty/ccache.git/commit
Revert "Only pass implicit -MQ to preprocessor if needed"
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 1 Jan 2020 20:59:29 +0000 (21:59 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 5 Jan 2020 19:00:56 +0000 (20:00 +0100)
commit6d4537695f8753556362c6c5521360ca9b596ab2
tree5b681e7ab5469dac4f9f46ba13b1258f8ea2dc77
parentdbf7e85f67cf785636341ce07380e7151b582ee6
Revert "Only pass implicit -MQ to preprocessor if needed"

This reverts commit 19c3729d30640fc2c78242cb46136e619fdbd802 and also
removes the incorrect and superfluous condition that the fix fixes.

The reason for reverting is that the change introduced a nasty bug: the
dependency file will get an incorrect object file location if 1) build
directory != source directory and 2) -MF is not specified explictly by
the user.

Details: The dependency file is created by the preprocessor pass which
does not have access to the final output file name, so the preprocessor
uses the default object location derived from the source file location
instead.

Note that this partly reverts a compatibility improvement for EDG-based
compilers (see issue #460).

It should be possible to pass the dependency arguments to the compiler
instead of the preprocessor to make -MD/-MMD without -MQ work, but
that’s too risky to be done as a bug fix.

Fixes #499.
src/ccache.c
unittest/test_argument_processing.c