From 24affc964c4e1488445a9c64173a17b3d74db0e6 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Mon, 28 Dec 2020 02:13:44 +0000 Subject: [PATCH] Restore the frame pointer on Linux (#78) See alliedmodders/sourcemod#1200 --- AMBuildScript | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index 4773b37..db79fdf 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -204,10 +204,12 @@ class MMSConfig(object): elif cxx.behavior == 'msvc': cfg.cflags += ['/Od', '/RTC1'] + # Don't omit the frame pointer. # This needs to be after our optimization flags which could otherwise disable it. - if cxx.name == 'msvc': - # Don't omit the frame pointer. - cfg.cflags += ['/Oy-'] + if cxx.behavior == 'gcc': + cxx.cflags += ['-fno-omit-frame-pointer'] + elif cxx.behavior == 'msvc': + cxx.cflags += ['/Oy-'] # Platform-specifics if builder.target_platform == 'linux':