From: Siva Chandra Reddy Date: Wed, 1 Apr 2020 23:05:55 +0000 (-0700) Subject: [libc] Collect objects only from visible deps of an object library. X-Git-Tag: llvmorg-12-init~9520 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=939fa1b5604cba7ed588d68f3d2f8c1bf599bbca;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/libc/cmake/modules/LLVMLibCRules.cmake b/libc/cmake/modules/LLVMLibCRules.cmake index d47c16d..897ec84 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()