OLD | NEW |
---|---|
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 Loading... | |
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' | |
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 ('arm', 64): 'arm', | |
130 ('mips', 32): 'mips', | |
Nico
2014/02/19 02:53:31
This should be "mipsel", not "mips", right?
| |
131 ('mips', 64): 'mips', | |
Nico
2014/02/19 02:53:31
(and this shouldn't do anything yet as it's curren
| |
132 }.get((c.TARGET_ARCH, c.TARGET_BITS)) | |
133 if gyp_arch: | |
134 c.gyp_env.GYP_DEFINES['target_arch'] = gyp_arch | |
135 | |
126 if c.BUILD_CONFIG == 'Release': | 136 if c.BUILD_CONFIG == 'Release': |
127 static_library(c, final=False) | 137 static_library(c, final=False) |
128 elif c.BUILD_CONFIG == 'Debug': | 138 elif c.BUILD_CONFIG == 'Debug': |
129 shared_library(c, final=False) | 139 shared_library(c, final=False) |
130 else: # pragma: no cover | 140 else: # pragma: no cover |
131 raise BadConf('Unknown build config "%s"' % c.BUILD_CONFIG) | 141 raise BadConf('Unknown build config "%s"' % c.BUILD_CONFIG) |
132 | 142 |
133 @config_ctx(group='builder') | 143 @config_ctx(group='builder') |
134 def ninja(c): | 144 def ninja(c): |
135 c.gyp_env.GYP_GENERATORS.add('ninja') | 145 c.gyp_env.GYP_GENERATORS.add('ninja') |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 def chromium_clang(c): | 222 def chromium_clang(c): |
213 c.compile_py.default_targets = ['All', 'chromium_builder_tests'] | 223 c.compile_py.default_targets = ['All', 'chromium_builder_tests'] |
214 | 224 |
215 @config_ctx(includes=['chromium']) | 225 @config_ctx(includes=['chromium']) |
216 def blink(c): | 226 def blink(c): |
217 c.compile_py.default_targets = ['blink_tests'] | 227 c.compile_py.default_targets = ['blink_tests'] |
218 | 228 |
219 @config_ctx(includes=['chromium_clang']) | 229 @config_ctx(includes=['chromium_clang']) |
220 def blink_clang(c): | 230 def blink_clang(c): |
221 c.compile_py.default_targets = ['blink_tests'] | 231 c.compile_py.default_targets = ['blink_tests'] |
OLD | NEW |