]> granicus.if.org Git - clang/commit
Fix the addition of Clang's profile runtime library to the link step
authorChandler Carruth <chandlerc@gmail.com>
Sun, 23 Jun 2013 11:28:48 +0000 (11:28 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 23 Jun 2013 11:28:48 +0000 (11:28 +0000)
commit9db37cd0aa8fa6ec840bfd9166090be5a39b691a
tree94c27e2b84ba0478de5480ea5a3bbdaaa140c18e
parent230cdaaab58a2cc00012c5766e396a3eba2aa940
Fix the addition of Clang's profile runtime library to the link step
when specifying --coverage (or related) flags.

The system for doing this was based on the old LLVM-hosted profile_rt
library, and hadn't been updated for Linux to use the new compiler-rt
library. Also, it couldn't possibly work on multiarch or biarch systems
in many cases. The whole thing now works much the same as the sanitizer
libraries that are built and used out of the compiler-rt repo.

Note that other target OSes haven't been updated because I don't know if
they're doing anything special with the installation path of profile_rt.
I suspect however that *all* of these are wrong and would encourage
maintainers of each target to take a hard look at how compiler-rt
runtime libraries are linked on their platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184666 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Tools.cpp
test/Driver/coverage-ld.c [new file with mode: 0644]