From 433fb9a96874422723d9a78efa1e7716a037c7dc Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 13 Apr 2016 15:11:16 +0200 Subject: [PATCH] deps: cherry-pick 1383d00 from v8 upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: tools: fix tickprocessor Cpp symbols on mac Despite man page documentation: -f Display the symbol table of a dynamic library flat (as one file not separate modules). `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument does not seem to be required, so just remove it completely. (For `-format` documentation - see `nm --help` on mac). BUG= Review URL: https://codereview.chromium.org/1840633002 Cr-Commit-Position: refs/heads/master@{#35445} Fix: #5903 PR-URL: https://github.com/nodejs/node/pull/6179 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis Reviewed-By: Michaƫl Zasso --- deps/v8/tools/tickprocessor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/v8/tools/tickprocessor.js b/deps/v8/tools/tickprocessor.js index d8575738553aa9..381e2f9b69ffa7 100644 --- a/deps/v8/tools/tickprocessor.js +++ b/deps/v8/tools/tickprocessor.js @@ -750,8 +750,11 @@ inherits(MacCppEntriesProvider, UnixCppEntriesProvider); MacCppEntriesProvider.prototype.loadSymbols = function(libName) { this.parsePos = 0; libName = this.targetRootFS + libName; + + // It seems that in OS X `nm` thinks that `-f` is a format option, not a + // "flat" display option flag. try { - this.symbols = [os.system(this.nmExec, ['-n', '-f', libName], -1, -1), '']; + this.symbols = [os.system(this.nmExec, ['-n', libName], -1, -1), '']; } catch (e) { // If the library cannot be found on this system let's not panic. this.symbols = '';