Index: pylib/gyp/generator/android.py |
diff --git a/pylib/gyp/generator/android.py b/pylib/gyp/generator/android.py |
index 9dcbb4fda6c16671d1a7bb6cc5aa878dee0d90b7..5afeb53450cef749696701487dd3906a55930bb0 100644 |
--- a/pylib/gyp/generator/android.py |
+++ b/pylib/gyp/generator/android.py |
@@ -50,6 +50,8 @@ generator_supports_multiple_toolsets = True |
generator_additional_non_configuration_keys = [ |
# Boolean to declare that this target does not want its name mangled. |
'android_unmangled_name', |
+ # Map of android build system variables to set. |
+ 'aosp_build_settings', |
] |
generator_additional_path_sections = [] |
generator_extra_sources_for_rules = [] |
@@ -829,6 +831,16 @@ class AndroidMkWriter(object): |
if self.type != 'none': |
self.WriteTargetFlags(spec, configs, link_deps) |
+ settings = spec.get('aosp_build_settings', {}) |
+ if settings: |
+ self.WriteLn('### Set directly by aosp_build_settings.') |
+ for k, v in settings.iteritems(): |
+ if isinstance(v, list): |
+ self.WriteList(v, k) |
+ else: |
+ self.WriteLn('%s := %s' % (k, make.QuoteIfNecessary(v))) |
+ self.WriteLn('') |
+ |
# Add to the set of targets which represent the gyp 'all' target. We use the |
# name 'gyp_all_modules' as the Android build system doesn't allow the use |
# of the Make target 'all' and because 'all_modules' is the equivalent of |