OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 recipe_engine.config import BadConf | 5 from recipe_engine.config import BadConf |
6 | 6 |
7 import DEPS | 7 import DEPS |
8 CONFIG_CTX = DEPS['chromium'].CONFIG_CTX | 8 CONFIG_CTX = DEPS['chromium'].CONFIG_CTX |
9 from recipe_engine.config_types import Path | 9 from recipe_engine.config_types import Path |
10 | 10 |
11 | 11 |
12 @CONFIG_CTX(includes=['chromium']) | 12 @CONFIG_CTX(includes=['chromium']) |
13 def libyuv(c): | 13 def libyuv(c): |
14 _libyuv_common(c) | 14 _libyuv_common(c) |
15 | 15 |
16 c.runtests.memory_tests_runner = Path('[CHECKOUT]', 'tools', | 16 c.runtests.memory_tests_runner = Path('[CHECKOUT]', 'tools', |
17 'valgrind-libyuv', 'libyuv_tests', | 17 'valgrind-libyuv', 'libyuv_tests', |
18 platform_ext={'win': '.bat', | 18 platform_ext={'win': '.bat', |
19 'mac': '.sh', | 19 'mac': '.sh', |
20 'linux': '.sh'}) | 20 'linux': '.sh'}) |
21 | 21 |
22 @CONFIG_CTX(includes=['chromium_clang']) | 22 @CONFIG_CTX(includes=['chromium_clang']) |
23 def libyuv_clang(c): | 23 def libyuv_clang(c): |
24 _libyuv_common(c) | 24 _libyuv_common(c) |
25 | 25 |
26 @CONFIG_CTX(includes=['chromium_linux_asan', 'lsan']) | |
27 def libyuv_asan(c): | |
28 _libyuv_common(c) | |
29 | |
30 @CONFIG_CTX(includes=['android']) | 26 @CONFIG_CTX(includes=['android']) |
31 def libyuv_android(c): | 27 def libyuv_android(c): |
32 pass | 28 pass |
33 | 29 |
34 @CONFIG_CTX(includes=['android_clang']) | 30 @CONFIG_CTX(includes=['android_clang']) |
35 def libyuv_android_clang(c): | 31 def libyuv_android_clang(c): |
36 pass | 32 pass |
37 | 33 |
38 @CONFIG_CTX(includes=['chromium', 'static_library']) | 34 @CONFIG_CTX(includes=['chromium', 'static_library']) |
39 def libyuv_ios(c): | 35 def libyuv_ios(c): |
40 if c.HOST_PLATFORM != 'mac': | 36 if c.HOST_PLATFORM != 'mac': |
41 raise BadConf('Only "mac" host platform is supported for iOS (got: "%s")' % | 37 raise BadConf('Only "mac" host platform is supported for iOS (got: "%s")' % |
42 c.HOST_PLATFORM) # pragma: no cover | 38 c.HOST_PLATFORM) # pragma: no cover |
43 if c.TARGET_PLATFORM != 'ios': | 39 if c.TARGET_PLATFORM != 'ios': |
44 raise BadConf('Only "ios" target platform is supported (got: "%s")' % | 40 raise BadConf('Only "ios" target platform is supported (got: "%s")' % |
45 c.TARGET_PLATFORM) # pragma: no cover | 41 c.TARGET_PLATFORM) # pragma: no cover |
46 c.build_config_fs = c.BUILD_CONFIG + '-iphoneos' | 42 c.build_config_fs = c.BUILD_CONFIG + '-iphoneos' |
47 | 43 |
48 gyp_defs = c.gyp_env.GYP_DEFINES | 44 gyp_defs = c.gyp_env.GYP_DEFINES |
49 gyp_defs['OS'] = c.TARGET_PLATFORM | 45 gyp_defs['OS'] = c.TARGET_PLATFORM |
50 if c.TARGET_BITS == 64: | 46 if c.TARGET_BITS == 64: |
51 gyp_defs['target_subarch'] = 'arm64' | 47 gyp_defs['target_subarch'] = 'arm64' |
52 | 48 |
53 _libyuv_common(c) | 49 _libyuv_common(c) |
54 | 50 |
55 def _libyuv_common(c): | 51 def _libyuv_common(c): |
56 c.compile_py.default_targets = ['All'] | 52 c.compile_py.default_targets = ['All'] |
OLD | NEW |