From fee17195669a26669868d26f43fa2fddef5f7845 Mon Sep 17 00:00:00 2001 From: "Mikhail R. Gadelha" Date: Fri, 22 Sep 2023 12:42:51 -0300 Subject: [PATCH] [libc] Update integration test's linking options This patch set the integration test's linking options to be the same one used in the hermetic tests. In particular, by removing -nostdlib the tests are linked with libgcc/compiler-rt and this fixes an issue undefined reference to __udivdi3 and __umoddi3 in rv32. --- 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 82e2ccf15f06d..3a6e0b8e3fcf9 100644 --- a/libc/cmake/modules/LLVMLibCTestRules.cmake +++ b/libc/cmake/modules/LLVMLibCTestRules.cmake @@ -525,7 +525,7 @@ function(add_integration_test test_name) --target=${LIBC_GPU_TARGET_TRIPLE}) endif() - target_link_options(${fq_build_target_name} PRIVATE -nostdlib -static) + target_link_options(${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static) target_link_libraries( ${fq_build_target_name} # The NVIDIA 'nvlink' linker does not currently support static libraries.