[Mlir-commits] [mlir] [MLIR] mlir_levelzero_runtime: remove dependency on LLVM (PR #182942)

Alexis Engelke llvmlistbot at llvm.org
Mon Mar 2 12:53:03 PST 2026


================
@@ -453,6 +453,16 @@ if(LLVM_ENABLE_PIC)
     if(NOT LevelZeroRuntime_FOUND)
       message(FATAL_ERROR "LevelZero not found. Please set LEVEL_ZERO_DIR.")
     endif()
+
+    # Check if compiler support RTTI and exceptions, which are required by the SYCL and LevelZero runtimes.
+    check_cxx_compiler_flag("-frtti" CXX_HAS_FRTTI_FLAG)
+    if(NOT CXX_HAS_FRTTI_FLAG)
+      message(FATAL_ERROR "CXX compiler does not accept flag -frtti")
+    endif()
+    check_cxx_compiler_flag("-fexceptions" CXX_HAS_FEXCEPTIONS_FLAG)
+    if(NOT CXX_HAS_FEXCEPTIONS_FLAG)
+      message(FATAL_ERROR "CXX compiler does not accept flag -fexceptions")
+    endif()
----------------
aengelke wrote:

LGTM.

https://github.com/llvm/llvm-project/pull/182942


More information about the Mlir-commits mailing list