================
@@ -659,24 +659,22 @@ function(cxx_link_system_libraries target)
     target_add_link_flags_if_supported(${target} PRIVATE "--unwindlib=none")
   endif()
 
-  if (LIBCXX_HAS_SYSTEM_LIB)
-    target_link_libraries(${target} PRIVATE System)
-  endif()
-
-  if (LIBCXX_HAS_PTHREAD_LIB)
-    target_link_libraries(${target} PRIVATE pthread)
-  endif()
+  if (NOT APPLE) # On Apple platforms, we always use -nostdlib++ so we don't 
need to re-add other libraries
+    if (LIBCXX_HAS_PTHREAD_LIB)
----------------
ldionne wrote:

On macos, linking explicitly against pthread isn't necessary. If you link 
against `libSystem`, you get the definitions of everything related to pthread!

https://github.com/llvm/llvm-project/pull/66940
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to