From d2f39521464f81397b48d4fa527804f9f6734e7d Mon Sep 17 00:00:00 2001 From: Lectem Date: Sun, 21 Jan 2018 17:38:48 +0100 Subject: [PATCH] Never build glsl-optimizer with ubsan --- cmake/3rdparty/glsl-optimizer.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/3rdparty/glsl-optimizer.cmake b/cmake/3rdparty/glsl-optimizer.cmake index 2cfc8fe..ae6d60d 100755 --- a/cmake/3rdparty/glsl-optimizer.cmake +++ b/cmake/3rdparty/glsl-optimizer.cmake @@ -20,6 +20,11 @@ set( GLSL-OPTIMIZER_INCLUDES ${BGFX_DIR}/3rdparty/glsl-optimizer/src ) +# glsl-optimizer makes UBSan segfault for whatever reason +# We already know that it's full of UB anyway... so just don't build it with UBSan +string(REPLACE "-fsanitize=undefined" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" ) +string(REPLACE "-fsanitize=undefined" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" ) + # glcpp file( GLOB GLCPP_SOURCES ${BGFX_DIR}/3rdparty/glsl-optimizer/src/glsl/glcpp/*.c ${BGFX_DIR}/3rdparty/glsl-optimizer/src/util/*.c ) add_library( glcpp ${GLCPP_SOURCES} )