Skip to content

Commit 7391738

Browse files
refacktargos
authored andcommitted
tools,gyp: cosmetic change to GYP make generator outputs
Puts the compilation target upfront for easy reading. PR-URL: #23156 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent d8cedf5 commit 7391738

File tree

1 file changed

+6
-6
lines changed
  • tools/gyp/pylib/gyp/generator

1 file changed

+6
-6
lines changed

tools/gyp/pylib/gyp/generator/make.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def CalculateGeneratorInputInfo(params):
147147
# special "figure out circular dependencies" flags around the entire
148148
# input list during linking.
149149
quiet_cmd_link = LINK($(TOOLSET)) $@
150-
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
150+
cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
151151
152152
# We support two kinds of shared objects (.so):
153153
# 1) shared_library, which is just bundling together many dependent libraries
@@ -166,10 +166,10 @@ def CalculateGeneratorInputInfo(params):
166166
# - Set SONAME to the library filename so our binaries don't reference
167167
# the local, absolute paths used on the link command-line.
168168
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
169-
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
169+
cmd_solink = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
170170
171171
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
172-
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
172+
cmd_solink_module = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
173173
"""
174174

175175
LINK_COMMANDS_MAC = """\
@@ -360,10 +360,10 @@ def CalculateGeneratorInputInfo(params):
360360
# - quiet_cmd_foo is the brief-output summary of the command.
361361
362362
quiet_cmd_cc = CC($(TOOLSET)) $@
363-
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
363+
cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c
364364
365365
quiet_cmd_cxx = CXX($(TOOLSET)) $@
366-
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
366+
cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c
367367
%(extra_commands)s
368368
quiet_cmd_touch = TOUCH $@
369369
cmd_touch = touch $@
@@ -1756,7 +1756,7 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
17561756
cmddigest = hashlib.sha1(command if command else self.target).hexdigest()
17571757
intermediate = "%s.intermediate" % (cmddigest)
17581758
self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
1759-
self.WriteLn('\t%s' % '@:');
1759+
self.WriteLn('\t%s' % '@:')
17601760
self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate))
17611761
# Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal.
17621762
# Adding it makes the action run alway, even when there are no changes.

0 commit comments

Comments
 (0)