diff options
author | Mike Harsch <mike@harschsystems.com> | 2013-01-06 22:29:38 -0700 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-01-08 03:41:26 +0100 |
commit | aeb030bead432a2de8fe8075afca2d070bb5540d (patch) | |
tree | 137d7a843a3bdcd21e135e0324822c60efb586d2 /tools | |
parent | 321b8eec08d445d60a4149bfa71959936fc189c6 (diff) | |
download | android-node-v8-aeb030bead432a2de8fe8075afca2d070bb5540d.tar.gz android-node-v8-aeb030bead432a2de8fe8075afca2d070bb5540d.tar.bz2 android-node-v8-aeb030bead432a2de8fe8075afca2d070bb5540d.zip |
build: fail w/err msg when missing binutils
Building --with-dtrace requires objdump from GNU binutils.
This change inserts a helpful error message if there is a
problem executing objdump.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/genv8constants.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tools/genv8constants.py b/tools/genv8constants.py index fb8b5ffa8c..a79ba06fdc 100755 --- a/tools/genv8constants.py +++ b/tools/genv8constants.py @@ -10,14 +10,28 @@ import re import subprocess import sys +import errno if len(sys.argv) != 3: print "usage: objsym.py outfile libv8_base.a" sys.exit(2); outfile = file(sys.argv[1], 'w'); -pipe = subprocess.Popen([ 'objdump', '-z', '-D', sys.argv[2] ], - bufsize=-1, stdout=subprocess.PIPE).stdout; +try: + pipe = subprocess.Popen([ 'objdump', '-z', '-D', sys.argv[2] ], + bufsize=-1, stdout=subprocess.PIPE).stdout; +except OSError, e: + if e.errno == errno.ENOENT: + print ''' + Node.js compile error: could not find objdump + + Check that GNU binutils are installed and included in PATH + ''' + else: + print 'problem running objdump: ', e.strerror + + sys.exit() + pattern = re.compile('(00000000|0000000000000000) <(.*)>:'); v8dbg = re.compile('^v8dbg.*$') numpattern = re.compile('^[0-9a-fA-F]{2} $'); |