[libc-commits] [libc] 939fa1b - [libc] Collect objects only from visible deps of an object library.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Thu Apr 9 10:57:53 PDT 2020
Author: Siva Chandra Reddy
Date: 2020-04-09T10:40:37-07:00
New Revision: 939fa1b5604cba7ed588d68f3d2f8c1bf599bbca
URL: https://github.com/llvm/llvm-project/commit/939fa1b5604cba7ed588d68f3d2f8c1bf599bbca
DIFF: https://github.com/llvm/llvm-project/commit/939fa1b5604cba7ed588d68f3d2f8c1bf599bbca.diff
LOG: [libc] Collect objects only from visible deps of an object library.
A typo in an earlier change allowed this check to be missed.
Reviewers: abrachet
Differential Revision: https://reviews.llvm.org/D77256
Added:
Modified:
libc/cmake/modules/LLVMLibCRules.cmake
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCRules.cmake b/libc/cmake/modules/LLVMLibCRules.cmake
index d47c16d3e694..897ec8438d94 100644
--- a/libc/cmake/modules/LLVMLibCRules.cmake
+++ b/libc/cmake/modules/LLVMLibCRules.cmake
@@ -142,7 +142,12 @@ function(add_object_library target_name)
${target_name}
${ADD_OBJECT_DEPENDS}
)
- foreach(obj_target IN LISTS ADD_ENTRYPOINT_OBJ_SPECIAL_OBJECTS)
+ foreach(obj_target IN LISTS ADD_OBJECT_DEPENDS)
+ if(NOT TARGET ${obj_target})
+ # Not all targets will be visible. So, we will ignore those which aren't
+ # visible yet.
+ continue()
+ endif()
get_target_property(obj_type ${obj_target} "TARGET_TYPE")
if((NOT obj_type) OR (NOT (${obj_type} STREQUAL ${OBJECT_LIBRARY_TARGET_TYPE})))
continue()
More information about the libc-commits
mailing list