]> granicus.if.org Git - clang/commitdiff
[profile] Support profiling runtime on Fuchsia
authorPetr Hosek <phosek@chromium.org>
Wed, 25 Jul 2018 03:01:35 +0000 (03:01 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 25 Jul 2018 03:01:35 +0000 (03:01 +0000)
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

lib/Driver/ToolChains/Fuchsia.cpp

index 459b68b55a3bcd1fa3380764cc5e96b57f5bb3e3..54c34ff159b1da7d40ecdfb8aa437836544dca10 100644 (file)
@@ -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))