commit - 16d11f88099b05c375ce3c45f0ff7ca2c8ded772
commit + 831dfaf6374a1345cdf4512f4cc504973802afa5
blob - 743edb9e01fa1521b8473189be23b49e4e065a49
blob + 529caf244b87783ea5586797e682d2e9292e1573
--- cmake/luajit.cmake
+++ cmake/luajit.cmake
"Build LuaJIT with AddressSanitizer" FORCE)
endif()
+if(ENABLE_UB_SANITIZER)
+ set(LUAJIT_USE_UBSAN ON CACHE BOOL
+ "Build LuaJIT with UndefinedBehaviourSanitizer" FORCE)
+endif()
+
if(TARGET_OS_DARWIN AND NOT LUAJIT_ENABLE_GC64)
# XXX: This is not the best idea to build LuaJIT on MacOS
# with GC64 disabled. But nobody will stop you from this.