Skip to content

Commit 0b56f34

Browse files
Fix some Android build issues occuring on certain OSX configurations
1 parent 6401430 commit 0b56f34

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

engine/engine.gyp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@
239239
'product_name': 'Standalone-Community',
240240
'product_prefix': '',
241241
'product_extension': '',
242-
'type': 'loadable_module',
242+
'product_dir': '<(PRODUCT_DIR)', # Shared libraries are not placed in PRODUCT_DIR by default
243+
'type': 'shared_library',
243244

244245
'ldflags':
245246
[

gyp/pylib/gyp/generator/make.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,14 @@ def CalculateGeneratorInputInfo(params):
138138
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
139139
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
140140
141+
# Commas need to be escaped in some circumstances
142+
COMMA := ,
143+
141144
# Figure out the correct --start-group and --end-group commands (not needed for
142145
# the MacOS linker)
143-
ifeq ($(shell uname),Linux)
144-
opt_start_group := -Wl,--start-group
145-
opt_end_group := -Wl,--end-group
146-
endif
146+
opt_start_group = $(if $(or $(filter $(shell uname),Linux),$(filter $(TOOLSET),target)),-Wl$(COMMA)--start-group)
147+
opt_end_group = $(if $(or $(filter $(shell uname),Linux),$(filter $(TOOLSET),target)),-Wl$(COMMA)--end-group)
148+
147149
148150
# Due to circular dependencies between libraries :(, we wrap the
149151
# special "figure out circular dependencies" flags around the entire

0 commit comments

Comments
 (0)