| 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 = c.CHECKOUT_PATH.join( | 16 c.runtests.memory_tests_runner = c.CHECKOUT_PATH.join( |
| 17 'tools', 'valgrind-libyuv', 'libyuv_tests', | 17 'tools', 'valgrind-libyuv', 'libyuv_tests', |
| 18 platform_ext={'win': '.bat', 'mac': '.sh', 'linux': '.sh'}) | 18 platform_ext={'win': '.bat', 'mac': '.sh', 'linux': '.sh'}) |
| 19 | 19 |
| 20 @CONFIG_CTX(includes=['chromium_clang']) | 20 @CONFIG_CTX(includes=['chromium_clang']) |
| 21 def libyuv_clang(c): | 21 def libyuv_clang(c): |
| 22 _libyuv_common(c) | 22 _libyuv_common(c) |
| 23 | 23 |
| 24 @CONFIG_CTX(includes=['ninja', 'gcc', 'goma']) |
| 25 def libyuv_gcc(c): |
| 26 _libyuv_common(c) |
| 27 |
| 24 @CONFIG_CTX(includes=['android']) | 28 @CONFIG_CTX(includes=['android']) |
| 25 def libyuv_android(c): | 29 def libyuv_android(c): |
| 26 if c.TARGET_ARCH == 'intel' and c.TARGET_BITS == 32: | 30 if c.TARGET_ARCH == 'intel' and c.TARGET_BITS == 32: |
| 27 c.gyp_env.GYP_DEFINES['android_full_debug'] = 1 | 31 c.gyp_env.GYP_DEFINES['android_full_debug'] = 1 |
| 28 | 32 |
| 29 @CONFIG_CTX(includes=['android_clang']) | 33 @CONFIG_CTX(includes=['android_clang']) |
| 30 def libyuv_android_clang(c): | 34 def libyuv_android_clang(c): |
| 31 pass | 35 pass |
| 32 | 36 |
| 33 @CONFIG_CTX(includes=['chromium', 'static_library']) | 37 @CONFIG_CTX(includes=['chromium', 'static_library']) |
| 34 def libyuv_ios(c): | 38 def libyuv_ios(c): |
| 35 if c.HOST_PLATFORM != 'mac': | 39 if c.HOST_PLATFORM != 'mac': |
| 36 raise BadConf('Only "mac" host platform is supported for iOS (got: "%s")' % | 40 raise BadConf('Only "mac" host platform is supported for iOS (got: "%s")' % |
| 37 c.HOST_PLATFORM) # pragma: no cover | 41 c.HOST_PLATFORM) # pragma: no cover |
| 38 if c.TARGET_PLATFORM != 'ios': | 42 if c.TARGET_PLATFORM != 'ios': |
| 39 raise BadConf('Only "ios" target platform is supported (got: "%s")' % | 43 raise BadConf('Only "ios" target platform is supported (got: "%s")' % |
| 40 c.TARGET_PLATFORM) # pragma: no cover | 44 c.TARGET_PLATFORM) # pragma: no cover |
| 41 c.build_config_fs = c.BUILD_CONFIG + '-iphoneos' | 45 c.build_config_fs = c.BUILD_CONFIG + '-iphoneos' |
| 42 | 46 |
| 43 gyp_defs = c.gyp_env.GYP_DEFINES | 47 gyp_defs = c.gyp_env.GYP_DEFINES |
| 44 gyp_defs['OS'] = c.TARGET_PLATFORM | 48 gyp_defs['OS'] = c.TARGET_PLATFORM |
| 45 if c.TARGET_BITS == 64: | 49 if c.TARGET_BITS == 64: |
| 46 gyp_defs['target_subarch'] = 'arm64' | 50 gyp_defs['target_subarch'] = 'arm64' |
| 47 | 51 |
| 48 _libyuv_common(c) | 52 _libyuv_common(c) |
| 49 | 53 |
| 50 def _libyuv_common(c): | 54 def _libyuv_common(c): |
| 51 c.compile_py.default_targets = ['All'] | 55 c.compile_py.default_targets = ['All'] |
| OLD | NEW |