[compiler-rt] 2fe66bd - [Compiler-rt] Emit error if builtins library cannot be found
Yi Kong via llvm-commits
llvm-commits at lists.llvm.org
Sat May 16 19:55:09 PDT 2020
Author: Yi Kong
Date: 2020-05-17T10:54:53+08:00
New Revision: 2fe66bdb2e5fb556e15d4a07158e89ec007c587b
URL: https://github.com/llvm/llvm-project/commit/2fe66bdb2e5fb556e15d4a07158e89ec007c587b
DIFF: https://github.com/llvm/llvm-project/commit/2fe66bdb2e5fb556e15d4a07158e89ec007c587b.diff
LOG: [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
Added:
Modified:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index 50611d6d608e..1dde396b1f69 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -237,6 +237,9 @@ function(add_compiler_rt_runtime name type)
if(COMPILER_RT_USE_BUILTINS_LIBRARY AND NOT type STREQUAL "OBJECT")
get_compiler_rt_target(${arch} target)
find_compiler_rt_library(builtins ${target} builtins_${libname})
+ if(builtins_${libname} STREQUAL "NOTFOUND")
+ message(FATAL_ERROR "Cannot find builtins library for the target architecture")
+ endif()
endif()
set(sources_${libname} ${LIB_SOURCES})
format_object_libs(sources_${libname} ${arch} ${LIB_OBJECT_LIBS})
More information about the llvm-commits
mailing list