llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang <details> <summary>Changes</summary> Similar to the Gnu toolchain, ignore uses of '-stdlib=libc++' when linking C code. CMake insists on adding it to the command line when linking C, and a bunch of other build systems to similarly. --- Full diff: https://github.com/llvm/llvm-project/pull/68011.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/FreeBSD.cpp (+3) ``````````diff diff --git a/clang/lib/Driver/ToolChains/FreeBSD.cpp b/clang/lib/Driver/ToolChains/FreeBSD.cpp index ff4d94c56f0d0ff..4d998e884f8ad42 100644 --- a/clang/lib/Driver/ToolChains/FreeBSD.cpp +++ b/clang/lib/Driver/ToolChains/FreeBSD.cpp @@ -356,6 +356,9 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, ToolChain.addProfileRTLibs(Args, CmdArgs); + // Silence warnings when linking C code with a C++ '-stdlib' argument. + Args.ClaimAllArgs(options::OPT_stdlib_EQ); + const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath()); C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::AtFileCurCP(), `````````` </details> https://github.com/llvm/llvm-project/pull/68011 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits