diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake --- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake +++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake @@ -237,6 +237,9 @@ if(COMPILER_RT_USE_BUILTINS_LIBRARY AND NOT type STREQUAL "OBJECT") get_compiler_rt_target(${arch} target) find_compiler_rt_library(builtins ${target} builtins_${libname}) + if(builtins_${libname} STREQUAL "NOTFOUND") + message(FATAL_ERROR "Cannot find builtins library for the target architecture") + endif() endif() set(sources_${libname} ${LIB_SOURCES}) format_object_libs(sources_${libname} ${arch} ${LIB_OBJECT_LIBS})