build: include postmortem symbols on linux
authorTimothy J Fontaine <tjfontaine@gmail.com>
Mon, 2 Dec 2013 02:57:43 +0000 (18:57 -0800)
committerTimothy J Fontaine <tjfontaine@gmail.com>
Mon, 2 Dec 2013 02:57:43 +0000 (18:57 -0800)
Previously we were building the symbols, but the linker was garbage
collecting the symbols because they weren't used. Inform the linker
that we want to keep all symbols from v8 around.

common.gypi
node.gyp

index 9ecfc4d..abe46be 100644 (file)
             ],
           }],
           ['OS=="solaris"', {
-            'cflags': [ '-fno-omit-frame-pointer' ],
             # pull in V8's postmortem metadata
             'ldflags': [ '-Wl,-z,allextract' ]
           }],
+          ['OS!="mac" and OS!="win"', {
+            'cflags': [ '-fno-omit-frame-pointer' ],
+          }],
         ],
         'msvs_settings': {
           'VCCLCompilerTool': {
index 89aa36f..3a1b8c9 100644 (file)
--- a/node.gyp
+++ b/node.gyp
             'PLATFORM="sunos"',
           ],
         }],
+        [
+          'OS=="linux"', {
+            'ldflags': [
+              '-Wl,--whole-archive <(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive',
+            ],
+        }],
       ],
       'msvs_settings': {
         'VCLinkerTool': {