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

Unified Diff: scripts/slave/recipe_modules/chromium_android/chromium_config.py

Issue 59233015: Make gyp target_arch setting native to chromium/config.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 1 month 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
Index: scripts/slave/recipe_modules/chromium_android/chromium_config.py
diff --git a/scripts/slave/recipe_modules/chromium_android/chromium_config.py b/scripts/slave/recipe_modules/chromium_android/chromium_config.py
index c91de1038add254eb856201e509333ecc6c2d4df..021afbafbc60fe2bb79929ceb7ba842bb683650b 100644
--- a/scripts/slave/recipe_modules/chromium_android/chromium_config.py
+++ b/scripts/slave/recipe_modules/chromium_android/chromium_config.py
@@ -3,10 +3,12 @@
# found in the LICENSE file.
from slave.recipe_config_types import Path
+from slave import recipe_config
from RECIPE_MODULES.chromium import CONFIG_CTX
-@CONFIG_CTX(includes=['ninja', 'static_library'])
+@CONFIG_CTX(includes=['ninja', 'static_library'],
+ config_vars={'TARGET_ARCH': 'arm', 'TARGET_BITS': 32})
def android_defaults(c):
c.compile_py.default_targets=['All']
c.gyp_env.GYP_CROSSCOMPILE = 1
@@ -19,12 +21,18 @@ def android_defaults(c):
gyp_defs['gcc_version'] = 46
gyp_defs['order_text_section'] = Path(
'[CHECKOUT]', 'orderfiles', 'orderfile.out')
- gyp_defs['target_arch'] = 'arm'
+
+ if c.HOST_PLATFORM != 'linux':
+ raise recipe_config.BadConf('Can only build android on linux.')
+ if c.TARGET_BITS != 32:
+ raise recipe_config.BadConf('Android cannot targit %d bits' % c.TARGET_BITS)
ghost stip (do not use) 2013/11/08 20:11:18 target
iannucci 2013/11/12 02:16:36 Lol. Done.
@CONFIG_CTX(includes=['android_defaults', 'default_compiler', 'goma'])
def main_builder(c):
ghost stip (do not use) 2013/11/08 20:11:18 maybe rename this to arm_builder?
iannucci 2013/11/12 02:16:36 I'd prefer to leave that to another CL. main_build
- pass
+ if c.TARGET_ARCH != 'arm':
+ raise recipe_config.BadConf(
+ 'Cannot target arm with TARGET_ARCH == %s' % c.TARGET_ARCH)
@CONFIG_CTX(includes=['android_defaults', 'clang', 'goma'])
def clang_builder(c):
@@ -34,9 +42,12 @@ def clang_builder(c):
def component_builder(c):
c.gyp_env.GYP_DEFINES['component'] = 'shared_library'
-@CONFIG_CTX(includes=['main_builder'])
+@CONFIG_CTX(includes=['android_defaults', 'default_compiler', 'goma'],
+ config_vars={'TARGET_ARCH': 'intel'})
def x86_builder(c):
- c.gyp_env.GYP_DEFINES['target_arch'] = 'ia32'
+ if c.TARGET_ARCH != 'intel':
+ raise recipe_config.BadConf(
+ 'Cannot target x86 with TARGET_ARCH == %s' % c.TARGET_ARCH)
@CONFIG_CTX(includes=['main_builder'])
def klp_builder(c):
@@ -49,7 +60,7 @@ def klp_builder(c):
def try_builder(c):
pass
-@CONFIG_CTX(includes=['x86_builder', 'try_builder'])
ghost stip (do not use) 2013/11/08 20:11:18 won't this mean x86_try_builder won't get apply_is
iannucci 2013/11/12 02:16:36 no, the recipes check to see if 'try' is in the bu
+@CONFIG_CTX(includes=['x86_builder'])
def x86_try_builder(c):
pass
@@ -73,6 +84,6 @@ def enormous_tests(c):
def try_instrumentation_tests(c):
pass
-@CONFIG_CTX(includes=['tests_base'])
+@CONFIG_CTX(includes=['x86_builder'])
def x86_try_instrumentation_tests(c):
pass

Powered by Google App Engine
This is Rietveld 408576698