Bug 1354353 - nICEr and nrappkit should not build with NVALGRIND under MOZ_VALGRIND builds; r=drno
authorDan Minor <dminor@mozilla.com>
Tue, 30 May 2017 12:37:29 -0400
changeset 412029 283eeb11b8f72c7f13c34244f97be699839bf93b
parent 412028 7061759a0b572538a8b2effa703d61f383c83c32
child 412030 dced7b9bcc5bd8ea3bc907536f3c1665788fd9fd
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno
bugs1354353, 1354207
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1354353 - nICEr and nrappkit should not build with NVALGRIND under MOZ_VALGRIND builds; r=drno This applies the fix used in Bug 1354207 for webrtc to nICEr and nrappkit.
media/mtransport/third_party/moz.build
--- a/media/mtransport/third_party/moz.build
+++ b/media/mtransport/third_party/moz.build
@@ -6,16 +6,26 @@
 
 include('/build/gyp.mozbuild')
 
 GYP_DIRS += [
     'nICEr',
     'nrappkit',
 ]
 
+# Set gyp vars that webrtc needs when building under various analysis tools.
+# Primarily this prevents webrtc from setting NVALGRIND and breaking builds.
+gyp_vars_copy = gyp_vars.copy()
+if CONFIG['MOZ_VALGRIND']:
+    gyp_vars_copy.update(build_for_tool="memcheck")
+elif CONFIG['MOZ_ASAN']:
+    gyp_vars_copy.update(build_for_tool="asan")
+elif CONFIG['MOZ_TSAN']:
+    gyp_vars_copy.update(build_for_tool="tsan")
+
 # These files cannot be built in unified mode because of name clashes on RCSSTRING
 nICEr_non_unified_sources = [
     'nICEr/src/crypto/nr_crypto.c',
     'nICEr/src/ice/ice_candidate.c',
     'nICEr/src/ice/ice_candidate_pair.c',
     'nICEr/src/ice/ice_component.c',
     'nICEr/src/ice/ice_ctx.c',
     'nICEr/src/ice/ice_media_stream.c',
@@ -57,20 +67,20 @@ nrappkit_non_unified_sources = [
     'nrappkit/src/util/libekr/r_memory.c',
     'nrappkit/src/util/libekr/r_replace.c',
     'nrappkit/src/util/libekr/r_time.c',
     'nrappkit/src/util/p_buf.c',
     'nrappkit/src/util/util.c',
 ]
 
 GYP_DIRS['nICEr'].input = 'nICEr/nicer.gyp'
-GYP_DIRS['nICEr'].variables = gyp_vars
+GYP_DIRS['nICEr'].variables = gyp_vars_copy
 # We allow warnings for third-party code that can be updated from upstream.
 GYP_DIRS['nICEr'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
 GYP_DIRS['nICEr'].sandbox_vars['FINAL_LIBRARY'] = 'xul'
 GYP_DIRS['nICEr'].non_unified_sources += nICEr_non_unified_sources
 
 GYP_DIRS['nrappkit'].input = 'nrappkit/nrappkit.gyp'
-GYP_DIRS['nrappkit'].variables = gyp_vars
+GYP_DIRS['nrappkit'].variables = gyp_vars_copy
 # We allow warnings for third-party code that can be updated from upstream.
 GYP_DIRS['nrappkit'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
 GYP_DIRS['nrappkit'].sandbox_vars['FINAL_LIBRARY'] = 'xul'
 GYP_DIRS['nrappkit'].non_unified_sources += nrappkit_non_unified_sources