diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake index b10a8cb87d4..d9805b03303 100644 --- a/cmake/find_llvm.cmake +++ b/cmake/find_llvm.cmake @@ -43,6 +43,12 @@ if (ENABLE_EMBEDDED_COMPILER) else() set (USE_EMBEDDED_COMPILER 0) endif() + + if (LLVM_FOUND AND OS_LINUX AND USE_LIBCXX) + message(WARNING "Option USE_INTERNAL_LLVM_LIBRARY is not set but the LLVM library from OS packages in Linux is incompatible with libc++ ABI. LLVM Will be disabled.") + set (LLVM_FOUND 0) + set (USE_EMBEDDED_COMPILER 0) + endif () else() set (LLVM_FOUND 1) set (USE_EMBEDDED_COMPILER 1)