moz.build (1751B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 with Files("**"): 8 BUG_COMPONENT = ("Core", "Graphics") 9 10 include('/build/gyp.mozbuild') 11 12 gyp_vars['moz_have_arm_sve2'] = 1 if CONFIG['SVE2_FLAGS'] else 0 13 gyp_vars['moz_have_arm_i8mm_and_dot_prod'] = 1 if CONFIG['NEON_I8MM_FLAGS'] and CONFIG['DOTPROD_FLAGS'] else 0 14 15 # Set gyp vars that libyuv needs when building under various analysis tools. 16 gyp_vars_copy = gyp_vars.copy() 17 if CONFIG['MOZ_VALGRIND']: 18 gyp_vars_copy.update(build_for_tool="memcheck") 19 elif CONFIG['MOZ_ASAN']: 20 gyp_vars_copy.update(build_for_tool="asan") 21 elif CONFIG['MOZ_TSAN']: 22 gyp_vars_copy.update(build_for_tool="tsan") 23 24 libyuv_non_unified_sources = [ 25 'libyuv/source/convert.cc', 26 'libyuv/source/convert_from.cc', 27 'libyuv/source/convert_from_argb.cc', 28 'libyuv/source/mjpeg_decoder.cc', 29 'libyuv/source/rotate_argb.cc', 30 'libyuv/source/row_common.cc', 31 'libyuv/source/row_lasx.cc', # duplicate definitions with row_lsx.cc 32 'libyuv/source/row_lsx.cc', 33 'libyuv/source/scale.cc', 34 'libyuv/source/scale_common.cc', 35 'libyuv/source/scale_uv.cc', 36 ] 37 38 GYP_DIRS += ['libyuv'] 39 GYP_DIRS['libyuv'].input = 'libyuv/libyuv.gyp' 40 GYP_DIRS['libyuv'].variables = gyp_vars_copy 41 GYP_DIRS['libyuv'].sandbox_vars['FINAL_LIBRARY'] = 'xul' 42 GYP_DIRS['libyuv'].non_unified_sources += libyuv_non_unified_sources 43 44 # We allow warnings for third-party code that can be updated from upstream. 45 GYP_DIRS['libyuv'].sandbox_vars['COMPILE_FLAGS'] = {'WARNINGS_AS_ERRORS': []}