From df5c26be74c508adc5eaa315b6090ca179a2f0bf Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Fri, 28 Sep 2018 20:06:15 -0400 Subject: [PATCH] tools,gyp: don't force build actions with multiple outputs Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal. Adding it makes the action run alway, even when there are no changes. Excluding macOS which has a different way of resolving dependancies which can lead to deadlocks. (refack): AFAICT because `*.intermediate` files don't have build rules. --- tools/gyp/pylib/gyp/generator/make.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py index e98d93ab233ff8..bf08a5c81625de 100644 --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py @@ -1758,8 +1758,15 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None, self.WriteLn('%s: %s' % (' '.join(outputs), intermediate)) self.WriteLn('\t%s' % '@:') self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate)) - self.WriteLn('%s: %s%s' % - (intermediate, ' '.join(inputs), force_append)) + # Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal. + # Adding it makes the action run alway, even when there are no changes. + # Excluding macOS which has a different way of resolving dependancies + # which can lead to deadlocks. + # (refack): AFAICT because `*.intermediate` files don't have build rules. + if self.flavor == 'mac': + self.WriteLn('%s: %s%s' % (intermediate, ' '.join(inputs), force_append)) + else: + self.WriteLn('%s: %s' % (intermediate, ' '.join(inputs))) actions.insert(0, '$(call do_cmd,touch)') if actions: