mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
Meta: Disable -fsanitize=function on macOS with clang 17 or higher
This seems to trip on calling file static functions through a function pointer directly. Still need to reduce and report upstream.
This commit is contained in:
parent
c0f50b12a4
commit
08108ac579
2 changed files with 6 additions and 0 deletions
|
@ -42,6 +42,9 @@ if (ENABLE_UNDEFINED_SANITIZER)
|
|||
if (UNDEFINED_BEHAVIOR_IS_FATAL)
|
||||
add_compile_options(-fno-sanitize-recover=undefined)
|
||||
endif()
|
||||
if (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang$" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "17")
|
||||
add_compile_options(-fno-sanitize=function)
|
||||
endif()
|
||||
add_link_options(-fsanitize=undefined)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -105,6 +105,9 @@ if (ENABLE_UNDEFINED_SANITIZER)
|
|||
if (UNDEFINED_BEHAVIOR_IS_FATAL)
|
||||
add_compile_options(-fno-sanitize-recover=undefined)
|
||||
endif()
|
||||
if (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang$" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "17")
|
||||
add_compile_options(-fno-sanitize=function)
|
||||
endif()
|
||||
set(LINKER_FLAGS "${LINKER_FLAGS} -fsanitize=undefined")
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue