[libc-commits] [libc] [libc] Update integration test's linking options (PR #67158)

via libc-commits libc-commits at lists.llvm.org
Fri Sep 22 08:49:01 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/67158.diff


1 Files Affected:

- (modified) libc/cmake/modules/LLVMLibCTestRules.cmake (+1-1) 


``````````diff
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.

``````````

</details>


https://github.com/llvm/llvm-project/pull/67158


More information about the libc-commits mailing list