summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-06-18 00:55:11 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2020-06-18 00:55:11 +0200
commite54723fa3469e8457b10103148f0b75d25ae0eff (patch)
tree084a7fb14cf664f96d8fe9b5480904370931553f
parent815fc9873230cb8085e1811578757946db555767 (diff)
downloadmariadb-git-e54723fa3469e8457b10103148f0b75d25ae0eff.tar.gz
When compiling with RelWithDebInfo, always use -fno-omit-frame-pointer
(if this option is present). perf, and other tools that do stack walking works much better with it.
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 02f13e39e58..898119f00b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -241,6 +241,9 @@ IF (WITH_MSAN)
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
ENDIF()
+# Be nice to profilers etc
+MY_CHECK_AND_SET_COMPILER_FLAG("-fno-omit-frame-pointer" RELWITHDEBINFO)
+
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load
OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ON)