[libc-commits] [libc] 7a87ff6 - [libc] suppress stdlib explicitly for crt1.a (#76079)

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


Author: Schrodinger ZHU Yifan
Date: 2023-12-20T09:42:35-08:00
New Revision: 7a87ff64e1fe970adcc41b7fc664fb5fd8410a68

URL: https://github.com/llvm/llvm-project/commit/7a87ff64e1fe970adcc41b7fc664fb5fd8410a68
DIFF: https://github.com/llvm/llvm-project/commit/7a87ff64e1fe970adcc41b7fc664fb5fd8410a68.diff

LOG: [libc] suppress stdlib explicitly for crt1.a (#76079)

[nd: updated oneline]

Added: 
    

Modified: 
    libc/startup/linux/CMakeLists.txt

Removed: 
    


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


        


More information about the libc-commits mailing list