r204939 - InstrProf: Pull in runtime on non-Darwin

Alexey Samsonov samsonov at google.com
Fri Mar 28 08:45:34 PDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140328/2aacb3e3/attachment.html>


More information about the cfe-commits mailing list