Index: pylib/gyp/generator/make.py |
=================================================================== |
--- pylib/gyp/generator/make.py (revision 1508) |
+++ pylib/gyp/generator/make.py (working copy) |
@@ -125,7 +125,7 @@ |
LINK_COMMANDS_LINUX = """\ |
quiet_cmd_alink = AR($(TOOLSET)) $@ |
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) |
+cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^) |
# Due to circular dependencies between libraries :(, we wrap the |
# special "figure out circular dependencies" flags around the entire |
@@ -176,7 +176,7 @@ |
LINK_COMMANDS_ANDROID = """\ |
quiet_cmd_alink = AR($(TOOLSET)) $@ |
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) |
+cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^) |
# Due to circular dependencies between libraries :(, we wrap the |
# special "figure out circular dependencies" flags around the entire |
@@ -262,6 +262,7 @@ |
LINK.target ?= %(LINK.target)s |
LDFLAGS.target ?= $(LDFLAGS) |
AR.target ?= $(AR) |
+ARFLAGS.target ?= %(ARFLAGS.target)s |
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need |
# to replicate this environment fallback in make as well. |
@@ -272,6 +273,7 @@ |
LINK.host ?= %(LINK.host)s |
LDFLAGS.host ?= |
AR.host ?= %(AR.host)s |
+ARFLAGS.host ?= %(ARFLAGS.host)s |
# Define a dir function that can handle spaces. |
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions |
@@ -1988,7 +1990,16 @@ |
'flock': 'lockf', |
}) |
+ if generator_flags.get('fat_static_libraries', False): |
Ryan Sleevi
2012/10/01 17:39:54
random drive by: If you're going to go through the
borenet
2012/10/01 18:07:10
This is what I was contemplating in my comment; it
|
+ arflags_linux = 'crs' |
+ else: |
+ arflags_linux = 'crsT' |
header_params.update({ |
+ 'ARFLAGS.target': arflags_linux, |
+ 'ARFLAGS.host': arflags_linux, |
+ }) |
+ |
+ header_params.update({ |
'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'), |
'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'), |
'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'), |