Disable debug symbols and frame pointer for macos

This causes some versions of clang to crash
This commit is contained in:
2024-08-08 11:51:13 -07:00
parent b5772a6aa0
commit 84c6a2bfc2
+6 -8
View File
@@ -31,14 +31,12 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
"MinSizeRel" "RelWithDebInfo") "MinSizeRel" "RelWithDebInfo")
endif() endif()
add_compile_options( add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum
-fdata-sections -Werror=switch-enum -fPIC)
-ffunction-sections if(NOT APPLE)
-Wswitch-enum # This causes some versions of clang to crash on macos
-Werror=switch-enum add_compile_options(-g -fno-omit-frame-pointer)
-fPIC endif()
-g
-fno-omit-frame-pointer)
set(full_relro_flags "-pie;LINKER:-z,relro,-z,now,-z,noexecstack") set(full_relro_flags "-pie;LINKER:-z,relro,-z,now,-z,noexecstack")
cmake_push_check_state() cmake_push_check_state()