r204939 - InstrProf: Pull in runtime on non-Darwin
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Mar 28 09:03:45 PDT 2014
Sorry for the delay — just getting going here on PDT.
This is the wrong change. I’ll comment in the thread for r205012.
On 2014 Mar 28, at 08:45, Alexey Samsonov <samsonov at google.com> wrote:
> I've submitted the -whole-archive change as r205012.
>
>
> On Fri, Mar 28, 2014 at 11:42 AM, Kostya Serebryany <kcc at google.com> wrote:
> This does not help.
> For asan&co we solve the same problem by adding -whole-archive/-no-whole-archive around the library in the linker command.
>
> --kcc
>
>
> On Thu, Mar 27, 2014 at 8:20 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> Author: dexonsmith
> Date: Thu Mar 27 11:20:02 2014
> New Revision: 204939
>
> URL: http://llvm.org/viewvc/llvm-project?rev=204939&view=rev
> Log:
> InstrProf: Pull in runtime on non-Darwin
>
> r204379 changed the way the profile runtime gets pulled in, but missed
> updating non-Darwin targets.
>
> Modified:
> cfe/trunk/lib/Driver/Tools.cpp
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=204939&r1=204938&r2=204939&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Thu Mar 27 11:20:02 2014
> @@ -1807,6 +1807,13 @@ static void addProfileRT(
> Args.hasArg(options::OPT_coverage)))
> return;
>
> + // Pull in runtime for -fprofile-inst-generate. This is required since there
> + // are no calls to the runtime in the code.
> + if (Args.hasArg(options::OPT_fprofile_instr_generate)) {
> + CmdArgs.push_back("-u");
> + CmdArgs.push_back("___llvm_profile_runtime");
> + }
> +
> SmallString<128> LibProfile = getCompilerRTLibDir(TC);
> llvm::sys::path::append(LibProfile,
> Twine("libclang_rt.profile-") + getArchNameForCompilerRTLib(TC) + ".a");
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
>
>
> --
> Alexey Samsonov, MSK
More information about the cfe-commits
mailing list