Commit Graph

3 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith 870b77cd4d InstrProf: Create a PIC version of the profile runtime
These tests were XPASS-ing on Linux bots creating Mach-O, which makes
sense, since the real difference is the object format.

I'm hoping a short-term fix to get these tests passing on ELF is to
create two copies of the runtime -- one built with -fPIC, and one
without.  A follow-up patch will change clang's driver to pick between
them depending on whether `-shared` is specified.

llvm-svn: 208947
2014-05-16 04:07:09 +00:00
Duncan P. N. Exon Smith f6366cbeff InstrProf: XFAIL tests from r208940 on Linux
According to the buildbots, the new features for shared objects don't
work on ELF since it requires an -fPIC when building the profile
library.  XFAIL these tests for now.

It's possible we'll have to build two versions of the profile library on
Linux (one with -fPIC and one without), but it's not clear to me exactly
how to resolve this.

llvm-svn: 208946
2014-05-16 02:53:19 +00:00
Duncan P. N. Exon Smith 084398857a InstrProf: Fix shared object profiling
Change the API of the instrumented profiling library to work with shared
objects.

  - Most things are now declared hidden, so that each executable gets
    its own copy.

  - Initialization hooks up a linked list of writers.

  - The raw format with shared objects that are profiled consists of a
    concatenated series of profiles.  llvm-profdata knows how to deal
    with that since r208938.

<rdar://problem/16918688>

llvm-svn: 208940
2014-05-16 01:30:24 +00:00