From: Petr Hosek Date: Wed, 25 Jul 2018 03:01:35 +0000 (+0000) Subject: [profile] Support profiling runtime on Fuchsia X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32655dde06d972cb8fab41a9d9e56f71c7093a60;p=clang [profile] Support profiling runtime on Fuchsia This ports the profiling runtime on Fuchsia and enables the instrumentation. Unlike on other platforms, Fuchsia doesn't use files to dump the instrumentation data since on Fuchsia, filesystem may not be accessible to the instrumented process. We instead use the data sink to pass the profiling data to the system the same sanitizer runtimes do. Differential Revision: https://reviews.llvm.org/D47208 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337881 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains/Fuchsia.cpp b/lib/Driver/ToolChains/Fuchsia.cpp index 459b68b55a..54c34ff159 100644 --- a/lib/Driver/ToolChains/Fuchsia.cpp +++ b/lib/Driver/ToolChains/Fuchsia.cpp @@ -109,6 +109,7 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA, addSanitizerRuntimes(ToolChain, Args, CmdArgs); AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); + ToolChain.addProfileRTLibs(Args, CmdArgs); if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { if (Args.hasArg(options::OPT_static))