w2yehia added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:440
+  if (NeedsProfileRT || needsGCovInstrumentation(Args))
+    CmdArgs.push_back("-lpthreads");
+
----------------
The change in `compiler-rt/lib/profile/InstrProfilingFile.c` affects non-AIX 
platforms too, so won't they need `-lpthreads` too?



================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:440
+  if (NeedsProfileRT || needsGCovInstrumentation(Args))
+    CmdArgs.push_back("-lpthreads");
+
----------------
w2yehia wrote:
> The change in `compiler-rt/lib/profile/InstrProfilingFile.c` affects non-AIX 
> platforms too, so won't they need `-lpthreads` too?
> 
In order to avoid adding -lpthreads, we can leave it to the user to decide 
whether to add or not (i.e. they would add -lpthreads to their application's 
link command if they want to).
And so to avoid a link error due to undefined symbol, we can define 
`pthread_atfork` as a weak empty stub in the compiler-rt.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155290/new/

https://reviews.llvm.org/D155290

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to