mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
fix(build): UBsan is enabled and disabled with the WHOA_UB_SAN option now
This commit is contained in:
parent
58d72f10ce
commit
03cf683cdd
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue