[compiler-rt] Don't error out on missing builtins when builting builtins themselves

This fixes bootstrapping the builtins when no previous version of
them exists after 2fe66bdb2e.

Also fix a whitespace issue in that commit.
This commit is contained in:
Martin Storsjö 2020-05-18 11:04:42 +03:00
parent 521b216094
commit 54a8524070
1 changed files with 3 additions and 2 deletions

View File

@ -234,10 +234,11 @@ function(add_compiler_rt_runtime name type)
set_output_name(output_name_${libname} ${name} ${arch})
endif()
endif()
if(COMPILER_RT_USE_BUILTINS_LIBRARY AND NOT type STREQUAL "OBJECT")
if(COMPILER_RT_USE_BUILTINS_LIBRARY AND NOT type STREQUAL "OBJECT" AND
NOT name STREQUAL "clang_rt.builtins")
get_compiler_rt_target(${arch} target)
find_compiler_rt_library(builtins ${target} builtins_${libname})
if(builtins_${libname} STREQUAL "NOTFOUND")
if(builtins_${libname} STREQUAL "NOTFOUND")
message(FATAL_ERROR "Cannot find builtins library for the target architecture")
endif()
endif()