moz.build (1568B)
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 include('/build/gyp.mozbuild') 8 9 GYP_DIRS += [ 10 'nICEr', 11 'nrappkit', 12 ] 13 14 # Set gyp vars that webrtc needs when building under various analysis tools. 15 # Primarily this prevents webrtc from setting NVALGRIND and breaking builds. 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 # These files cannot be built in unified mode because of name clashes on RCSSTRING 25 26 GYP_DIRS['nICEr'].input = 'nICEr/nicer.gyp' 27 GYP_DIRS['nICEr'].variables = gyp_vars_copy 28 GYP_DIRS['nICEr'].sandbox_vars['FINAL_LIBRARY'] = 'xul' 29 GYP_DIRS['nrappkit'].input = 'nrappkit/nrappkit.gyp' 30 GYP_DIRS['nrappkit'].variables = gyp_vars_copy 31 GYP_DIRS['nrappkit'].sandbox_vars['FINAL_LIBRARY'] = 'xul' 32 33 34 if CONFIG["CC_TYPE"] == "gcc": 35 GYP_DIRS['nICEr'].sandbox_vars['CFLAGS'] = ['-Wno-stringop-overflow'] 36 GYP_DIRS['nrappkit'].sandbox_vars['CFLAGS'] = ['-Wno-stringop-overflow'] 37 if int(CONFIG["CC_VERSION"].split(".")[0]) >= 8: 38 GYP_DIRS['nICEr'].sandbox_vars['CFLAGS'] += ['-Wno-stringop-truncation'] 39 GYP_DIRS['nrappkit'].sandbox_vars['CFLAGS'] += ['-Wno-stringop-truncation']