Skip to content

Commit c27fff2

Browse files
committed
Bug 1457483 Retrieve nm from environment for check_vanilla_allocations.py r=glandium
MozReview-Commit-ID: HIZpMk4Ierb --HG-- extra : rebase_source : 5671a3f0ad8599aafb737f9fe6f76a5a4aa1d896
1 parent c2db6a7 commit c27fff2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

config/check_vanilla_allocations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import re
4343
import subprocess
4444
import sys
45+
import buildconfig
4546

4647
# The obvious way to implement this script is to search for occurrences of
4748
# malloc et al, succeed if none are found, and fail is some are found.
@@ -76,7 +77,8 @@ def main():
7677
# -u: show only undefined symbols
7778
# -C: demangle symbol names
7879
# -A: show an object filename for each undefined symbol
79-
cmd = ['nm', '-u', '-C', '-A', args.file]
80+
nm = buildconfig.substs.get('NM', 'nm')
81+
cmd = [nm, '-u', '-C', '-A', args.file]
8082
lines = subprocess.check_output(cmd, universal_newlines=True,
8183
stderr=subprocess.PIPE).split('\n')
8284

js/src/old-configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,7 @@ AC_SUBST(AR)
16871687
AC_SUBST(AR_FLAGS)
16881688
AC_SUBST(AR_EXTRACT)
16891689
AC_SUBST(AS)
1690+
AC_SUBST(NM)
16901691
AC_SUBST_LIST(ASFLAGS)
16911692
AC_SUBST(AS_DASH_C_FLAG)
16921693
AC_SUBST(RC)

old-configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4059,6 +4059,7 @@ AC_SUBST(AR)
40594059
AC_SUBST(AR_FLAGS)
40604060
AC_SUBST(AR_EXTRACT)
40614061
AC_SUBST(AS)
4062+
AC_SUBST(NM)
40624063
AC_SUBST_LIST(ASFLAGS)
40634064
AC_SUBST(AS_DASH_C_FLAG)
40644065
AC_SUBST(RC)

0 commit comments

Comments
 (0)