[libc-commits] [libc] [libc] Update integration test's linking options (PR #67158)
Mikhail R. Gadelha via libc-commits
libc-commits at lists.llvm.org
Fri Sep 22 08:47:26 PDT 2023
https://github.com/mikhailramalho created https://github.com/llvm/llvm-project/pull/67158
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.
>From fee17195669a26669868d26f43fa2fddef5f7845 Mon Sep 17 00:00:00 2001
From: "Mikhail R. Gadelha" <mikhail at igalia.com>
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 82e2ccf15f06d4f..3a6e0b8e3fcf903 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.
More information about the libc-commits
mailing list