From https://github.com/openquery/mariadb-server/commit/43bf72e45b9ead6aa0dc4abd6e5719c6381974b5

--- storage/mroonga/vendor/groonga/CMakeLists.txt.orig	2017-05-14 23:13:18 UTC
+++ storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -167,6 +167,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COM
   MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-clobbered")
 endif()
 
+if(CMAKE_COMPILER_IS_CLANGCXX)
+  MY_CHECK_AND_SET_COMPILER_FLAG("-fexceptions")
+endif()
+
 if(NOT DEFINED CMAKE_C_COMPILE_OPTIONS_PIC)
   # For old CMake
   if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX)
