Disable rtti / exceptions on the non-Windows builds.
RTTI makes the binaries bigger, exceptions make life harder for optimisers. Neither are actually used. This doesn't preclude anything #including snmalloc.h with RTTI enabled, it just disables it in the shim libraries and tests. The FreeBSD libc builds were already doing this with no ill effect.
This commit is contained in:
committed by
David Chisnall
parent
2cd84c80b2
commit
ccd8ec9b4f
@@ -37,7 +37,7 @@ if(MSVC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
else()
|
||||
find_package(Threads REQUIRED)
|
||||
add_compile_options(-mcx16 -march=native -Wall -Wextra -Werror -Wsign-conversion -g)
|
||||
add_compile_options(-mcx16 -march=native -Wall -Wextra -Werror -Wsign-conversion -g -fno-exceptions -fno-rtti)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
Reference in New Issue
Block a user