tools,gyp: don't force build actions with multiple outputs#23982
tools,gyp: don't force build actions with multiple outputs#23982refack wants to merge 1 commit intonodejs:masterfrom
Conversation
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.
|
/CC @nodejs/python @nodejs/build-files @nodejs/gyp |
| if self.flavor == 'mac': | ||
| self.WriteLn('%s: %s%s' % (intermediate, ' '.join(inputs), force_append)) | ||
| else: | ||
| self.WriteLn('%s: %s' % (intermediate, ' '.join(inputs))) |
There was a problem hiding this comment.
This is the wrong way of doing it. You're effectively ignoring the value of the force argument to WriteMakeRule() here.
The call comes from WriteDoCmd(). Forcing the action to run when it's a command is correct; commands are imperatives. You should try to come up with another way of solving this.
There was a problem hiding this comment.
Yeah, I know this is a hack. But the soup GYP generates for make is hard to reason about, and empirically this works (it also works on macOS, but might lead to deadlocks when run -jN with N > 1). Works as in rebuilds iff action's file inputs are touched.
I'll give it more thought...
|
|
|
@sam-github yes. I work with this patch applied: |
Excluding macOS which has a different way of resolving dependencies which can lead to deadlocks.
Reroll: #23156
Refs: #23257
Fixes: #23255
Don't add
force_append(FORCE_DO_CMD) to the intermediate sentinel.Adding it makes the action run alway, even when there are no changes.
(refack): AFAICT because
*.intermediatefiles don't have build rules.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes