mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 03:56:06 +00:00
[libc][NFC] Fix -DSHOW_INTERMEDIATE_OBJECTS=DEPS
to work properly for entry points and unit tests. (#79254)
This commit is contained in:
parent
e099e7b278
commit
c1cb0b80f0
@ -652,7 +652,7 @@ function(create_entrypoint_object fq_target_name)
|
||||
if(SHOW_INTERMEDIATE_OBJECTS)
|
||||
message(STATUS "Adding entrypoint object ${fq_target_name}")
|
||||
if(${SHOW_INTERMEDIATE_OBJECTS} STREQUAL "DEPS")
|
||||
foreach(dep IN LISTS ADD_OBJECT_DEPENDS)
|
||||
foreach(dep IN LISTS ADD_ENTRYPOINT_OBJ_DEPENDS)
|
||||
message(STATUS " ${fq_target_name} depends on ${dep}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
@ -129,6 +129,16 @@ function(create_libc_unittest fq_target_name)
|
||||
list(APPEND fq_deps_list libc.src.__support.StringUtil.error_to_string
|
||||
libc.test.UnitTest.ErrnoSetterMatcher)
|
||||
list(REMOVE_DUPLICATES fq_deps_list)
|
||||
|
||||
if(SHOW_INTERMEDIATE_OBJECTS)
|
||||
message(STATUS "Adding unit test ${fq_target_name}")
|
||||
if(${SHOW_INTERMEDIATE_OBJECTS} STREQUAL "DEPS")
|
||||
foreach(dep IN LISTS LIBC_UNITTEST_DEPENDS)
|
||||
message(STATUS " ${fq_target_name} depends on ${dep}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_object_files_for_test(
|
||||
link_object_files skipped_entrypoints_list ${fq_deps_list})
|
||||
if(skipped_entrypoints_list)
|
||||
@ -157,15 +167,6 @@ function(create_libc_unittest fq_target_name)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(SHOW_INTERMEDIATE_OBJECTS)
|
||||
message(STATUS "Adding unit test ${fq_target_name}")
|
||||
if(${SHOW_INTERMEDIATE_OBJECTS} STREQUAL "DEPS")
|
||||
foreach(dep IN LISTS ADD_OBJECT_DEPENDS)
|
||||
message(STATUS " ${fq_target_name} depends on ${dep}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LIBC_UNITTEST_NO_RUN_POSTBUILD)
|
||||
set(fq_build_target_name ${fq_target_name})
|
||||
else()
|
||||
@ -521,7 +522,7 @@ function(add_integration_test test_name)
|
||||
link_object_files skipped_entrypoints_list ${fq_deps_list})
|
||||
if(skipped_entrypoints_list)
|
||||
if(LIBC_CMAKE_VERBOSE_LOGGING)
|
||||
set(msg "Skipping unittest ${fq_target_name} as it has missing deps: "
|
||||
set(msg "Skipping integration test ${fq_target_name} as it has missing deps: "
|
||||
"${skipped_entrypoints_list}.")
|
||||
message(STATUS ${msg})
|
||||
endif()
|
||||
@ -704,7 +705,7 @@ function(add_libc_hermetic_test test_name)
|
||||
get_object_files_for_test(
|
||||
link_object_files skipped_entrypoints_list ${fq_deps_list})
|
||||
if(skipped_entrypoints_list)
|
||||
set(msg "Skipping unittest ${fq_target_name} as it has missing deps: "
|
||||
set(msg "Skipping hermetic test ${fq_target_name} as it has missing deps: "
|
||||
"${skipped_entrypoints_list}.")
|
||||
message(STATUS ${msg})
|
||||
return()
|
||||
|
Loading…
x
Reference in New Issue
Block a user