You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This output has a problem: if a.rs is deleted from the filesystem and dependencies on it erased from lib.rs, then make will attempt to look for a rule to generate a.rs when we request that things be remade. Not finding one, it will helpfully complain that there is no rule to make a.rs and exit.
This can, of course, be worked around by clearing out your entire build directory and starting over, but this seems undesirable.
GCC has an option (-MP) to produce "phony" targets for all the dependencies of the object file; this prevents issues in cases like the above:
This PR closes out #28716 and #28735 by making two changes to the compiler:
1. The `--emit` flag to the compiler now supports the ability to specify the output file name of a partuclar emit type. For example `--emit dep-info=bar.d,asm=foo.s,link` is now accepted.
2. The dep-info emission now emits a dummy target for all input file names to protect against deleted files.
Running something like:
will produce a depfile containing a rule like:
This output has a problem: if
a.rs
is deleted from the filesystem and dependencies on it erased fromlib.rs
, thenmake
will attempt to look for a rule to generatea.rs
when we request that things be remade. Not finding one, it will helpfully complain that there is no rule to makea.rs
and exit.This can, of course, be worked around by clearing out your entire build directory and starting over, but this seems undesirable.
GCC has an option (
-MP
) to produce "phony" targets for all the dependencies of the object file; this prevents issues in cases like the above:since
make
now understands how to "generate"a.rs
if it doesn't find it.The text was updated successfully, but these errors were encountered: