[libc-commits] [libc] [libc] suppress stdlib explicitly (PR #76079)

via libc-commits libc-commits at lists.llvm.org
Wed Dec 20 09:20:32 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

<details>
<summary>Changes</summary>



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


1 Files Affected:

- (modified) libc/startup/linux/CMakeLists.txt (+1-1) 


``````````diff
diff --git a/libc/startup/linux/CMakeLists.txt b/libc/startup/linux/CMakeLists.txt
index d81c7db7a558b3..2d55a365669718 100644
--- a/libc/startup/linux/CMakeLists.txt
+++ b/libc/startup/linux/CMakeLists.txt
@@ -26,7 +26,7 @@ function(merge_relocatable_object name)
   )
   # Pass -r to the driver is much cleaner than passing -Wl,-r: the compiler knows it is
   # a relocatable linking and will not pass other irrelevant flags to the linker.
-  target_link_options(${relocatable_target} PRIVATE -r)
+  target_link_options(${relocatable_target} PRIVATE -r -nostdlib)
   set_target_properties(
     ${relocatable_target}
     PROPERTIES

``````````

</details>


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


More information about the libc-commits mailing list