From d971cd1b181557eaac297410ce809dcdf441f211 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 28 Mar 2014 17:53:22 +0000 Subject: InstrProf: Emit runtime hook directly in IRGen -u behaviour is apparently not portable between linkers (see cfe-commits discussions for r204379 and r205012). I've moved the logic to IRGen, where it should have been in the first place. I don't have a Linux system to test this on, so it's possible this logic *still* doesn't pull in the instrumented profiling runtime on Linux. I'm in the process of getting tests going on the compiler-rt side (llvm-commits "[PATCH] InstrProf: Add initial compiler-rt test"). Once we have tests for the full flow there, the runtime logic should get a whole lot less brittle. llvm-svn: 205023 --- clang/lib/Driver/Tools.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'clang/lib/Driver/Tools.cpp') diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 2141cc9656b..9a31eb9f9d6 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1817,13 +1817,6 @@ 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"); -- cgit v1.2.3