From 1d3d8c0e5545b1f253dbe4c3525eeb2f1312b689 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 17 Jul 2014 09:55:07 +0400 Subject: [PATCH] gyp: do not let `v8dbg_` slip away on osx Pass `-force_load` to linker when linking to `libv8_base` to preserve `v8dbg_` symbols, which are useful for debugging. --- common.gypi | 2 +- node.gyp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index c05b793e95..542214218a 100644 --- a/common.gypi +++ b/common.gypi @@ -21,7 +21,7 @@ ['OS != "win"', { 'v8_postmortem_support': 'true' }], - ['GENERATOR == "ninja"', { + ['GENERATOR == "ninja" or OS== "mac"', { 'OBJ_DIR': '<(PRODUCT_DIR)/obj', 'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a', }, { diff --git a/node.gyp b/node.gyp index f6586c4d44..38311a1cc4 100644 --- a/node.gyp +++ b/node.gyp @@ -271,6 +271,14 @@ 'PLATFORM="darwin"', ], }], + [ 'OS=="mac" and v8_postmortem_support=="true"', { + # Do not let `v8dbg_` symbols slip away + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-force_load,<(V8_BASE)', + ], + }, + }], [ 'OS=="freebsd"', { 'libraries': [ '-lutil',