[PATCH] D63329: Allow static linking of libc++ on Linux, just like -static-libstdc++

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 14 11:55:59 PDT 2019


hfinkel added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:570
 
+      // FIXME: libc++ dynamically links against libpthread, so for static
+      // linking, we need to supply that dependency.
----------------
Why does this say FIXME?


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:574
+        // FIXME: Again, like above, does this really make sense for all GNU
+        // toolchains?
+        WantPthread = true;
----------------
It seems to me that, in general, the answer will be yes. std::thread is built on pthreads, generally, and if we need to change this for particular systems, then that can always be done as a special case.


Repository:
  rC Clang

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

https://reviews.llvm.org/D63329





More information about the cfe-commits mailing list