mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
fix(build): WHOA_ALLOW_UNDEFINED_BEHAVIOR is now required to disable UBsan in Debug build mode
This commit is contained in:
parent
b3be0e0a7c
commit
c2a86dd72c
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GN
|
||||||
# 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 DEFINED WHOA_ALLOW_UNDEFINED_BEHAVIOR)
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT WHOA_ALLOW_UNDEFINED_BEHAVIOR)
|
||||||
# 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