From d0f73d383d5e1ed58c96a272036744d4bed22b8f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 2 Sep 2022 05:47:42 +0200 Subject: [PATCH] build: go faster, drop -fno-omit-frame-pointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This flag was added back in 2013 to support postmortem debugging on Linux but it has a pretty bad impact on performance (up to 10%) and I don't think it's actually necessary to get meaningful stack traces. Maybe with mdb but gdb and lldb seem to manage just fine. Even if the flag is necessary for postmortem debugging, I don't think it's appropriate to make performance for all users suffer for the benefit of a fringe group. PR-URL: https://github.com/nodejs/node/pull/44452 Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Jiawen Geng Reviewed-By: Franziska Hinkelmann --- common.gypi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 37910064880140..2a8beb34c1c7c2 100644 --- a/common.gypi +++ b/common.gypi @@ -204,6 +204,7 @@ ], }], ['OS=="solaris"', { + 'cflags': [ '-fno-omit-frame-pointer' ], # pull in V8's postmortem metadata 'ldflags': [ '-Wl,-z,allextract' ] }], @@ -211,9 +212,6 @@ # increase performance, number from experimentation 'cflags': [ '-qINLINE=::150:100000' ] }], - ['OS!="mac" and OS!="win" and OS!="zos"', { - 'cflags': [ '-fno-omit-frame-pointer' ], - }], ['OS=="linux"', { 'conditions': [ ['enable_pgo_generate=="true"', {