Chromium Code Reviews| Index: pylib/gyp/generator/android.py |
| =================================================================== |
| --- pylib/gyp/generator/android.py (revision 1519) |
| +++ pylib/gyp/generator/android.py (working copy) |
| @@ -45,6 +45,15 @@ |
| generator_supports_multiple_toolsets = True |
| +# Generator-specific gyp specs. |
| +generator_additional_non_configuration_keys = [ |
| + # Boolean to declare that this target does not want its name mangled. |
| + 'android_unmangled_name', |
| +] |
| +generator_additional_path_sections = [] |
| +generator_extra_sources_for_rules = [] |
| + |
| + |
| SHARED_FOOTER = """\ |
| # "gyp_all_modules" is a concatenation of the "gyp_all_modules" targets from |
| # all the included sub-makefiles. This is just here to clarify. |
| @@ -577,6 +586,10 @@ |
| distinguish gyp-generated module names. |
| """ |
| + if spec.get('android_unmangled_name'): |
|
Nico
2012/10/15 23:35:13
This is true for targets that say
'android_unma
Torne
2012/10/16 10:34:31
Done.
|
| + assert self.type != 'shared_library' or self.target.startswith('lib') |
| + return self.target |
| + |
| if self.type == 'shared_library': |
| # For reasons of convention, the Android build system requires that all |
| # shared library modules are named 'libfoo' when generating -l flags. |
| @@ -839,10 +852,11 @@ |
| # Add an alias from the gyp target name to the Android module name. This |
| # simplifies manual builds of the target, and is required by the test |
| # framework. |
| - self.WriteLn('# Alias gyp target name.') |
| - self.WriteLn('.PHONY: %s' % self.target) |
| - self.WriteLn('%s: %s' % (self.target, self.android_module)) |
| - self.WriteLn('') |
| + if self.target != self.android_module: |
| + self.WriteLn('# Alias gyp target name.') |
| + self.WriteLn('.PHONY: %s' % self.target) |
| + self.WriteLn('%s: %s' % (self.target, self.android_module)) |
| + self.WriteLn('') |
| # Add the command to trigger build of the target type depending |
| # on the toolset. Ex: BUILD_STATIC_LIBRARY vs. BUILD_HOST_STATIC_LIBRARY |