From 2069bce4cfef31468c979e7d157d8fe84bfd2a70 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 17 Apr 2023 09:36:13 -0500 Subject: [PATCH] [libc][fix] Only use the object files when targeting NVPTX Summary: The `nvlink` linker doesn't support static libraries, so we just pass in the object files. The condition was erroneously doing this for every single GPU architecture and not just NVIDIA. The AMDGPU support handles static libraries just fine. --- libc/cmake/modules/LLVMLibCTestRules.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake index d1ce34f..592b632 100644 --- a/libc/cmake/modules/LLVMLibCTestRules.cmake +++ b/libc/cmake/modules/LLVMLibCTestRules.cmake @@ -516,7 +516,7 @@ function(add_integration_test test_name) target_link_libraries( ${fq_build_target_name} # The NVIDIA 'nvlink' linker does not currently support static libraries. - $<$>:${fq_target_name}.__libc__> + $<$>:${fq_target_name}.__libc__> libc.startup.${LIBC_TARGET_OS}.crt1 libc.test.IntegrationTest.test) add_dependencies(${fq_build_target_name} -- 2.7.4