phosek added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:680
+    for (StringRef Arg : CmdArgs) {
+      if (Arg == "-lm" || Arg == "-lc") {
+        // TODO: Add -lllvmlibc before -lpthread when LLVM libc has pthread
----------------
This wouldn't handle the case where you use `-nolibc path/to/libc.a` in which 
case you'd have to manually pass in the `libllvmllibc.a`, but I'm not sure if 
that's a case we care about.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:684
+        WithLLVMLibc.push_back("-lllvmlibc");
+        WithLLVMLibc.push_back(Arg.data());
+      } else {
----------------
You can move this after the condition and omit the `else` branch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97736

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

Reply via email to