forked from OSchip/llvm-project
InstrProf: Pull in runtime on non-Darwin
r204379 changed the way the profile runtime gets pulled in, but missed updating non-Darwin targets. llvm-svn: 204939
This commit is contained in:
parent
abfa261a63
commit
a19ffae1b0
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue