Skip to content

Commit 2fe66bd

Browse files
committed
[Compiler-rt] Emit error if builtins library cannot be found
Since setting COMPILER_RT_USE_BUILTINS_LIBRARY would remove -z,defs flag, missing builtins library would continue to build unnoticed. Explicitly emit an error in such case. Differential Revision: https://reviews.llvm.org/D79470
1 parent 3735505 commit 2fe66bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ function(add_compiler_rt_runtime name type)
237237
if(COMPILER_RT_USE_BUILTINS_LIBRARY AND NOT type STREQUAL "OBJECT")
238238
get_compiler_rt_target(${arch} target)
239239
find_compiler_rt_library(builtins ${target} builtins_${libname})
240+
if(builtins_${libname} STREQUAL "NOTFOUND")
241+
message(FATAL_ERROR "Cannot find builtins library for the target architecture")
242+
endif()
240243
endif()
241244
set(sources_${libname} ${LIB_SOURCES})
242245
format_object_libs(sources_${libname} ${arch} ${LIB_OBJECT_LIBS})

0 commit comments

Comments
 (0)