File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1+ include (CheckCCompilerFlag)
12
23include (SwiftSupport)
34include (DTrace)
@@ -229,11 +230,11 @@ if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
229230 PRIVATE
230231 -Xclang -fblocks)
231232else ()
232- # FIXME(compnerd) add check for -momit-leaf-frame-pointer?
233- target_compile_options (dispatch
234- PRIVATE
235- -fblocks
236- -momit-leaf-frame-pointer )
233+ check_c_compiler_flag( " -momit-leaf-frame-pointer -Werror -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
234+ target_compile_options (dispatch PRIVATE -fblocks)
235+ if (C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
236+ target_compile_options (dispatch PRIVATE -momit-leaf-frame-pointer)
237+ endif ( )
237238endif ()
238239if (LibRT_FOUND)
239240 target_link_libraries (dispatch PRIVATE RT::rt)
You can’t perform that action at this time.
0 commit comments