[libc-commits] [PATCH] D149683: [libc] Replace -nostdlib with -nolibc and -nostartfiles for hermetic test link.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue May 2 12:53:54 PDT 2023


sivachandra created this revision.
sivachandra added a reviewer: jhuber6.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
sivachandra requested review of this revision.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149683

Files:
  libc/cmake/modules/LLVMLibCTestRules.cmake


Index: libc/cmake/modules/LLVMLibCTestRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCTestRules.cmake
+++ libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -657,7 +657,7 @@
   target_compile_options(${fq_build_target_name}
       PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS} ${HERMETIC_TEST_COMPILE_OPTIONS})
 
-  target_link_options(${fq_build_target_name} PRIVATE -nostdlib -static)
+  target_link_options(${fq_build_target_name} PRIVATE -nolibc -nostartfiles -static)
   target_link_libraries(
     ${fq_build_target_name}
     libc.startup.${LIBC_TARGET_OS}.crt1


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149683.518837.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230502/e98b2fc9/attachment.bin>


More information about the libc-commits mailing list