Skip to content

Commit a3e9ae9

Browse files
android,build: fix linking when building for host
Fixes linking libraries undefined reference errors when building snapshots for Android on Linux. Uses --start-group and --end-group or gcc will make recognizing referenced symbols dependent on library order.
1 parent a39af27 commit a3e9ae9

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def CalculateGeneratorInputInfo(params):
201201
quiet_cmd_link = LINK($(TOOLSET)) $@
202202
quiet_cmd_link_host = LINK($(TOOLSET)) $@
203203
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
204-
cmd_link_host = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
204+
cmd_link_host = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
205205
206206
# Other shared-object link notes:
207207
# - Set SONAME to the library filename so our binaries don't reference

0 commit comments

Comments
 (0)