[CMake] Check the builtins library value first
authorPetr Hosek <phosek@google.com>
Fri, 6 Aug 2021 08:47:38 +0000 (01:47 -0700)
committerPetr Hosek <phosek@google.com>
Fri, 6 Aug 2021 17:59:24 +0000 (10:59 -0700)
commitf59f6598790c8a74bcb1ab7e045484925e8bf551
tree767cd3ad2db906605cccf43190254265535adc19
parentdddd524bb8844b225d42c98d381d745d4fd549ea
[CMake] Check the builtins library value first

When the builtins library isn't found, find_compiler_rt_library
returns NOTFOUND so we'll end up linking against -lNOTFOUND. We need
to check the return value before adding it to the list.

Differential Revision: https://reviews.llvm.org/D107627
compiler-rt/cmake/config-ix.cmake