Bug 1495314 - Use the value of MOZ_DEBUG_RUST from individual objects in the Tup backend. r=firefox-build-system-reviewers,mshal
authorChris Manchester <cmanchester@mozilla.com>
Mon, 01 Oct 2018 16:13:46 +0000
changeset 439008 c4758f66e313122b753ed49c5bad0d803b2a604a
parent 439007 bcdbc281a48d53c76737abd2ab776deefaf59338
child 439009 896fabac8cad3a569737c2679bf3533e5656f2e8
push id70183
push usercmanchester@mozilla.com
push dateMon, 01 Oct 2018 17:10:49 +0000
treeherderautoland@c4758f66e313 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, mshal
bugs1495314
milestone64.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 1495314 - Use the value of MOZ_DEBUG_RUST from individual objects in the Tup backend. r=firefox-build-system-reviewers,mshal Differential Revision: https://phabricator.services.mozilla.com/D7261
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -761,17 +761,17 @@ class TupBackend(CommonBackend):
                 return ['--bin', obj.name]
 
         def feature_flags(obj):
             if isinstance(obj, RustLibrary) and obj.features:
                 return ['--features', ' '.join(obj.features)]
             return []
 
         cargo_flags = ['--build-plan', '-Z', 'unstable-options']
-        if not self.environment.substs.get('MOZ_DEBUG_RUST'):
+        if not obj.config.substs.get('MOZ_DEBUG_RUST'):
             cargo_flags += ['--release']
         cargo_flags += [
             '--frozen',
             '--manifest-path', mozpath.join(obj.srcdir, 'Cargo.toml'),
         ] + output_flags(obj) + [
             '--target=%s' % self.environment.substs['RUST_TARGET'],
         ] + feature_flags(obj)