sivachandra 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 ---------------- phosek wrote: > 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. Yeah, its hard to cater to all combinations. In this case though, assuming `libllvmlibc.a` is available in path, one can add `-lllvmlibc` in the right place. ================ Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:684 + WithLLVMLibc.push_back("-lllvmlibc"); + WithLLVMLibc.push_back(Arg.data()); + } else { ---------------- phosek wrote: > You can move this after the condition and omit the `else` branch. [Shame cube] Fixed. 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