[PATCH] D107627: [CMake] Check the builtins library value first
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 6 10:58:31 PDT 2021
phosek updated this revision to Diff 364843.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107627/new/
https://reviews.llvm.org/D107627
Files:
compiler-rt/cmake/config-ix.cmake
Index: compiler-rt/cmake/config-ix.cmake
===================================================================
--- compiler-rt/cmake/config-ix.cmake
+++ compiler-rt/cmake/config-ix.cmake
@@ -17,6 +17,9 @@
if (COMPILER_RT_USE_BUILTINS_LIBRARY)
include(HandleCompilerRT)
find_compiler_rt_library(builtins "" COMPILER_RT_BUILTINS_LIBRARY)
+ # TODO(PR51389): We should check COMPILER_RT_BUILTINS_LIBRARY and report an
+ # error if the value is NOTFOUND rather than silenty continuing but we first
+ # need to fix find_compiler_rt_library on Darwin.
else()
if (ANDROID)
check_library_exists(gcc __gcc_personality_v0 "" COMPILER_RT_HAS_GCC_LIB)
@@ -32,7 +35,10 @@
list(APPEND CMAKE_REQUIRED_LIBRARIES c)
endif ()
if (COMPILER_RT_USE_BUILTINS_LIBRARY)
- list(APPEND CMAKE_REQUIRED_LIBRARIES "${COMPILER_RT_BUILTINS_LIBRARY}")
+ # TODO: remote this check once we address PR51389.
+ if (${COMPILER_RT_BUILTINS_LIBRARY})
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${COMPILER_RT_BUILTINS_LIBRARY}")
+ endif()
elseif (COMPILER_RT_HAS_GCC_S_LIB)
list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
elseif (COMPILER_RT_HAS_GCC_LIB)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107627.364843.patch
Type: text/x-patch
Size: 1163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210806/a8125a07/attachment.bin>
More information about the llvm-commits
mailing list