From 7f12512db2f60f5de5acdb2d072de1f135d9dc43 Mon Sep 17 00:00:00 2001 From: Siva Chandra Reddy Date: Tue, 21 Apr 2020 10:10:58 -0700 Subject: [libc][Take 2] Propagate entrypoint deps to downstream targets. This reverts commit a8086ba4ac85152d8407630e56e9ee5c8b46a214. Setting couple of target properties to an empty string was missed in the previous commit. --- libc/loader/linux/CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'libc/loader') diff --git a/libc/loader/linux/CMakeLists.txt b/libc/loader/linux/CMakeLists.txt index f58603f..b972f72 100644 --- a/libc/loader/linux/CMakeLists.txt +++ b/libc/loader/linux/CMakeLists.txt @@ -8,7 +8,7 @@ function(add_loader_object name) ) get_fq_target_name(${name} fq_target_name) - + get_fq_deps_list(fq_deps_list ${ADD_LOADER_OBJECT_DEPENDS}) if(ADD_LOADER_OBJECT_ALIAS) list(LENGTH ADD_LOADER_OBJECT_DEPENDS deps_size) if(NOT (${deps_size} EQUAL "1")) @@ -23,14 +23,15 @@ function(add_loader_object name) set_target_properties( ${fq_target_name} PROPERTIES - "TARGET_TYPE" "LOADER_OBJECT" - "OBJECT_FILES" ${dep_objfile} + "TARGET_TYPE" "${OBJECT_LIBRARY_TARGET_TYPE}" + "OBJECT_FILES" "" + "DEPS" "${fq_dep_name}" ) return() endif() add_object_library( - ${name}_objects + ${name}.__objects__ SRCS ${ADD_LOADER_OBJECT_SRC} DEPENDS ${ADD_LOADER_OBJECT_DEPENDS} COMPILE_OPTIONS ${ADD_LOADER_OBJECT_COMPILE_OPTIONS} @@ -39,8 +40,8 @@ function(add_loader_object name) set(objfile ${LIBC_BUILD_DIR}/lib/${name}.o) add_custom_command( OUTPUT ${objfile} - COMMAND cp $ ${objfile} - DEPENDS $ + COMMAND cp $ ${objfile} + DEPENDS $ ) add_custom_target( ${fq_target_name} @@ -49,8 +50,9 @@ function(add_loader_object name) set_target_properties( ${fq_target_name} PROPERTIES - "TARGET_TYPE" "LOADER_OBJECT" - "OBJECT_FILES" ${objfile} + "TARGET_TYPE" "${OBJECT_LIBRARY_TARGET_TYPE}" + "OBJECT_FILES" "" + "DEPS" "${fq_target_name}.__objects__" ) endfunction() -- cgit v1.1