Skip to content

Commit 54a8524

Browse files
committed
[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 2fe66bd. Also fix a whitespace issue in that commit.
1 parent 521b216 commit 54a8524

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,11 @@ function(add_compiler_rt_runtime name type)
234234
set_output_name(output_name_${libname} ${name} ${arch})
235235
endif()
236236
endif()
237-
if(COMPILER_RT_USE_BUILTINS_LIBRARY AND NOT type STREQUAL "OBJECT")
237+
if(COMPILER_RT_USE_BUILTINS_LIBRARY AND NOT type STREQUAL "OBJECT" AND
238+
NOT name STREQUAL "clang_rt.builtins")
238239
get_compiler_rt_target(${arch} target)
239240
find_compiler_rt_library(builtins ${target} builtins_${libname})
240-
if(builtins_${libname} STREQUAL "NOTFOUND")
241+
if(builtins_${libname} STREQUAL "NOTFOUND")
241242
message(FATAL_ERROR "Cannot find builtins library for the target architecture")
242243
endif()
243244
endif()

0 commit comments

Comments
 (0)