Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: pylib/gyp/generator/android.py

Issue 565743004: android: Add a way to override build system variables. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Change key to aosp_build_settings Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/android/gyptest-settings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | test/android/gyptest-settings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698