--- a/src/liboslexec/CMakeLists.txt
+++ b/src/liboslexec/CMakeLists.txt
@@ -49,6 +49,8 @@
     set_source_files_properties (llvm_util.cpp
                                  PROPERTIES COMPILE_FLAGS "/GR-")
 else ()
+if(NOT MINGW)
     set_source_files_properties (llvm_util.cpp
                                  PROPERTIES COMPILE_FLAGS "-fno-rtti")
+endif()
 endif()
 
 # link with (system) library to prevent missing symbols inside clangDriver.lib
