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

via libc-commits libc-commits at lists.llvm.org
Fri Sep 22 09:06:31 PDT 2023


Author: Mikhail R. Gadelha
Date: 2023-09-22T12:06:27-04:00
New Revision: 2f98ff716c1e79bc76123cef51d0248807301864

URL: https://github.com/llvm/llvm-project/commit/2f98ff716c1e79bc76123cef51d0248807301864
DIFF: https://github.com/llvm/llvm-project/commit/2f98ff716c1e79bc76123cef51d0248807301864.diff

LOG: [libc] Update integration test's linking options (#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.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCTestRules.cmake

Removed: 
    


################################################################################
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