From c5a26d81ec792db0abf903d190707ba9045aad25 Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Fri, 27 Apr 2018 10:25:35 -0500 Subject: [PATCH] Bug 1457483 Retrieve nm from environment for check_vanilla_allocations.py r=glandium MozReview-Commit-ID: HIZpMk4Ierb --HG-- extra : rebase_source : 670da25b7e516e176f2eae116b58e5e62ccbbde7 --- config/check_vanilla_allocations.py | 4 +++- js/src/old-configure.in | 1 + old-configure.in | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/check_vanilla_allocations.py b/config/check_vanilla_allocations.py index 84ce4ec74f7b..76d7bfb9e070 100644 --- a/config/check_vanilla_allocations.py +++ b/config/check_vanilla_allocations.py @@ -42,6 +42,7 @@ import argparse import re import subprocess import sys +import buildconfig # The obvious way to implement this script is to search for occurrences of # malloc et al, succeed if none are found, and fail is some are found. @@ -76,7 +77,8 @@ def main(): # -u: show only undefined symbols # -C: demangle symbol names # -A: show an object filename for each undefined symbol - cmd = ['nm', '-u', '-C', '-A', args.file] + nm = buildconfig.substs.get('NM') or 'nm' + cmd = [nm, '-u', '-C', '-A', args.file] lines = subprocess.check_output(cmd, universal_newlines=True, stderr=subprocess.PIPE).split('\n') diff --git a/js/src/old-configure.in b/js/src/old-configure.in index b3d00ab81fb9..ddfa3b7c4577 100644 --- a/js/src/old-configure.in +++ b/js/src/old-configure.in @@ -1692,6 +1692,7 @@ AC_SUBST(AR) AC_SUBST(AR_FLAGS) AC_SUBST(AR_EXTRACT) AC_SUBST(AS) +AC_SUBST(NM) AC_SUBST_LIST(ASFLAGS) AC_SUBST(AS_DASH_C_FLAG) AC_SUBST(RC) diff --git a/old-configure.in b/old-configure.in index 7e80fccf4902..8a6fd6ba85ef 100644 --- a/old-configure.in +++ b/old-configure.in @@ -4064,6 +4064,7 @@ AC_SUBST(AR) AC_SUBST(AR_FLAGS) AC_SUBST(AR_EXTRACT) AC_SUBST(AS) +AC_SUBST(NM) AC_SUBST_LIST(ASFLAGS) AC_SUBST(AS_DASH_C_FLAG) AC_SUBST(RC)