Skip to content

Commit 9b2063a

Browse files
pschuhrokhinip
authored andcommitted
Address TODO to unblock master-next.
Signed-off-by: Kim Topley <[email protected]>
1 parent 48011c4 commit 9b2063a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include(CheckCCompilerFlag)
12

23
include(SwiftSupport)
34
include(DTrace)
@@ -228,11 +229,11 @@ if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
228229
PRIVATE
229230
-Xclang -fblocks)
230231
else()
231-
# FIXME(compnerd) add check for -momit-leaf-frame-pointer?
232-
target_compile_options(dispatch
233-
PRIVATE
234-
-fblocks
235-
-momit-leaf-frame-pointer)
232+
check_c_compiler_flag("-momit-leaf-frame-pointer -Werror -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
233+
target_compile_options(dispatch PRIVATE -fblocks)
234+
if (C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
235+
target_compile_options(dispatch PRIVATE -momit-leaf-frame-pointer)
236+
endif()
236237
endif()
237238
if(LibRT_FOUND)
238239
target_link_libraries(dispatch PRIVATE RT::rt)
File renamed without changes.

0 commit comments

Comments
 (0)