From: fcambus Date: Fri, 3 Sep 2021 16:11:45 +0000 (+0000) Subject: Allow the compiler driver to link the libclang_rt.profile library. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ab29ea966281b9858a45bf031eac47d2ab1cd59c;p=openbsd Allow the compiler driver to link the libclang_rt.profile library. With this change, passing -fprofile-instr-generate -fcoverage-mapping when building programs will attempt linking against libclang_rt.profile.a. Please note that we do not ship the library yet. OK jca@ --- diff --git a/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp b/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp index 41df6d9a8d7..863ca52faa1 100644 --- a/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp +++ b/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp @@ -220,6 +220,8 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtend))); } + ToolChain.addProfileRTLibs(Args, CmdArgs); + const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath()); C.addCommand(std::make_unique( JA, *this, ResponseFileSupport::AtFileCurCP(), Exec, CmdArgs, Inputs));