Skip to content

Commit cec1de3

Browse files
authored
[libc] Fix vendor implemented math functions not being exported (#65510)
Summary: A previous introduced a new object type for the GPU functions implemented by an external vendor library. This was done so they we did not attempt to run tests on functions which we did not implement, however this accidentally stopped them from being included in the actual output. Fix this by checking the new type as well. The long term goal is to remove this vendor handling altogether, but is being used as a short-term solution to provide a math library on the GPU which currently lacks one.
1 parent ec70337 commit cec1de3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libc/cmake/modules/LLVMLibCLibraryRules.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ function(collect_object_file_deps target result)
1919
return()
2020
endif()
2121

22-
if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
22+
if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
23+
${target_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
2324
set(entrypoint_target ${target})
2425
get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
2526
if(is_alias)
@@ -85,7 +86,8 @@ function(add_entrypoint_library target_name)
8586
list(APPEND all_deps ${recursive_deps})
8687
# Add the entrypoint object target explicitly as collect_object_file_deps
8788
# only collects object files from non-entrypoint targets.
88-
if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
89+
if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
90+
${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
8991
set(entrypoint_target ${dep})
9092
get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
9193
if(is_alias)

0 commit comments

Comments
 (0)