From ab29ea966281b9858a45bf031eac47d2ab1cd59c Mon Sep 17 00:00:00 2001 From: fcambus Date: Fri, 3 Sep 2021 16:11:45 +0000 Subject: [PATCH] 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@ --- gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp | 2 ++ 1 file changed, 2 insertions(+) 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)); -- 2.20.1