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

Side by Side Diff: scripts/slave/recipe_modules/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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from slave.recipe_config import config_item_context, ConfigGroup 5 from slave.recipe_config import config_item_context, ConfigGroup
6 from slave.recipe_config import Dict, Single, Static, Set, BadConf 6 from slave.recipe_config import Dict, Single, Static, Set, BadConf
7 from slave.recipe_config_types import Path 7 from slave.recipe_config_types import Path
8 8
9 # Because of the way that we use decorators, pylint can't figure out the proper 9 # Because of the way that we use decorators, pylint can't figure out the proper
10 # type signature of functions annotated with the @config_ctx decorator. 10 # type signature of functions annotated with the @config_ctx decorator.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 if c.HOST_BITS < c.TARGET_BITS: 113 if c.HOST_BITS < c.TARGET_BITS:
114 raise BadConf('host bits < targ bits') 114 raise BadConf('host bits < targ bits')
115 115
116 c.build_config_fs = c.BUILD_CONFIG 116 c.build_config_fs = c.BUILD_CONFIG
117 if c.HOST_PLATFORM == 'win': 117 if c.HOST_PLATFORM == 'win':
118 if c.TARGET_BITS == 64: 118 if c.TARGET_BITS == 64:
119 # Windows requires 64-bit builds to be in <dir>_x64. 119 # Windows requires 64-bit builds to be in <dir>_x64.
120 c.build_config_fs = c.BUILD_CONFIG + '_x64' 120 c.build_config_fs = c.BUILD_CONFIG + '_x64'
121 c.gyp_env.GYP_MSVS_VERSION = '2012' 121 c.gyp_env.GYP_MSVS_VERSION = '2012'
122 c.gyp_env.GYP_DEFINES['target_arch'] = 'x64'
navabi 2013/11/08 19:01:15 Was this needed for c.HOST_PLATFORM == win and c.T
iannucci 2013/11/08 19:49:57 It was just a temporary holdover until we did the
123 else: 122 else:
124 c.gyp_env.GYP_MSVS_VERSION = '2010' 123 c.gyp_env.GYP_MSVS_VERSION = '2010'
125 124
125 gyp_arch = {
126 ('intel', 32) : 'ia32',
127 ('intel', 64) : 'x64',
128 ('arm', 32) : 'arm',
129 ('mips', 32) : 'mips',
130 }.get((c.TARGET_ARCH, c.TARGET_BITS))
131 if gyp_arch:
132 c.gyp_env.GYP_DEFINES['target_arch'] = gyp_arch
133
126 if c.BUILD_CONFIG == 'Release': 134 if c.BUILD_CONFIG == 'Release':
127 static_library(c, final=False) 135 static_library(c, final=False)
128 elif c.BUILD_CONFIG == 'Debug': 136 elif c.BUILD_CONFIG == 'Debug':
129 shared_library(c, final=False) 137 shared_library(c, final=False)
130 else: # pragma: no cover 138 else: # pragma: no cover
131 raise BadConf('Unknown build config "%s"' % c.BUILD_CONFIG) 139 raise BadConf('Unknown build config "%s"' % c.BUILD_CONFIG)
132 140
133 @config_ctx() 141 @config_ctx()
134 def disable_aura(c): 142 def disable_aura(c):
135 if c.TARGET_PLATFORM == 'win': 143 if c.TARGET_PLATFORM == 'win':
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if c.TARGET_PLATFORM in ('linux', 'win'): 231 if c.TARGET_PLATFORM in ('linux', 'win'):
224 c.gyp_env.GYP_DEFINES['use_ash'] = 0 232 c.gyp_env.GYP_DEFINES['use_ash'] = 0
225 c.gyp_env.GYP_DEFINES['use_aura'] = 0 233 c.gyp_env.GYP_DEFINES['use_aura'] = 0
226 234
227 @config_ctx(includes=['chromium_clang']) 235 @config_ctx(includes=['chromium_clang'])
228 def blink_clang(c): 236 def blink_clang(c):
229 c.compile_py.default_targets = ['all_webkit'] 237 c.compile_py.default_targets = ['all_webkit']
230 if c.TARGET_PLATFORM in ('linux', 'win'): 238 if c.TARGET_PLATFORM in ('linux', 'win'):
231 c.gyp_env.GYP_DEFINES['use_ash'] = 0 239 c.gyp_env.GYP_DEFINES['use_ash'] = 0
232 c.gyp_env.GYP_DEFINES['use_aura'] = 0 240 c.gyp_env.GYP_DEFINES['use_aura'] = 0
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698