Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3566)

Issue 3981053: [google] Work around build system bug in handling of -MD (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by Diego Novillo
Modified:
13 years, 3 months ago
Reviewers:
simonb, gcc-patches
Visibility:
Public.

Description

Google's build system has always assumed that -MD always produces output. This is an outstanding bug that for now is easier to work around with this hack. Tested on x86_64. Committed on google/integration. 2011-02-02 Diego Novillo <dnovillo@google.com> * c-family/c-opts.c (c_common_finish): Emit deps even if the file has syntax errors. diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index befd644..e116921 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -1093,7 +1093,11 @@ c_common_finish (void) FILE *deps_stream = NULL; /* Don't write the deps file if there are errors. */ - if (cpp_opts->deps.style != DEPS_NONE && !seen_error ()) + /* FIXME. We are emitting the deps file even if there were errors. + This is a temporary workaround to avoid confusing Google's build + system. It assumes that deps files are always emitted even + in the presence of errors. */ + if (cpp_opts->deps.style != DEPS_NONE /*&& !seen_error ()*/) { /* If -M or -MM was seen without -MF, default output to the output stream. */

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M gcc/c-family/c-opts.c View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 2
Diego Novillo
13 years, 3 months ago (2011-02-02 14:41:47 UTC) #1
simonb
13 years, 3 months ago (2011-02-03 17:13:01 UTC) #2
OK
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b