mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-09 02:46:00 +03:00
fix(build): UBsan is enabled and disabled with the WHOA_UB_SAN option now
This commit is contained in:
parent
58d72f10ce
commit
03cf683cdd
@ -59,7 +59,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU
|
|||||||
# Some templates abuse offsetof
|
# Some templates abuse offsetof
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof")
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT WHOA_ALLOW_UNDEFINED_BEHAVIOR)
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND WHOA_UB_SAN)
|
||||||
# Enable UBsan
|
# Enable UBsan
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||||
# Allow strange alignments
|
# Allow strange alignments
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user