File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ include(DispatchSanitization)
118
118
include (DispatchCompilerWarnings)
119
119
include (DTrace)
120
120
121
+ include (EnableFramePointers)
122
+
121
123
# NOTE(abdulras) this is the CMake supported way to control whether we generate
122
124
# shared or static libraries. This impacts the behaviour of `add_library` in
123
125
# what type of library it generates.
Original file line number Diff line number Diff line change
1
+ #
2
+ # Including this file enables frame pointers, if we know how.
3
+ #
4
+
5
+ include (CheckCompilerFlag)
6
+
7
+ # Check if the compiler supports -fno-omit-frame-pointer
8
+ check_compiler_flag(C -fno-omit-frame-pointer SUPPORTS_NO_OMIT_FP)
9
+
10
+ # If it does, use it
11
+ if (SUPPORTS_NO_OMIT_FP)
12
+ add_compile_options ($<$<COMPILE_LANGUAGE:C,CXX>:-fno-omit-frame-pointer>)
13
+ endif ()
You can’t perform that action at this time.
0 commit comments