[PATCH] D35385: [Driver] Darwin: Link in the profile runtime archive first

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 13 14:29:03 PDT 2017


vsk created this revision.

While building a project with code coverage enabled, we can link in
dependencies which export a weak definition of __llvm_profile_filename.

After r306710, linking in the profiling runtime could pull in a weak
definition of this symbol from a dependency, instead of from within the
runtime's archive.

This inconsistency causes issues during API verification, and is also a
practical problem (the symbol would go missing were the dependent dylib
to be switched out). Introduce a LinkFirst runtime link option to make
sure we always search the profiling runtime for this symbol first.

rdar://problem/33271080


https://reviews.llvm.org/D35385

Files:
  lib/Driver/ToolChains/Darwin.cpp
  lib/Driver/ToolChains/Darwin.h
  test/Driver/darwin-ld.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35385.106538.patch
Type: text/x-patch
Size: 7499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170713/cbc309f3/attachment-0001.bin>


More information about the cfe-commits mailing list