Open Quuxplusone opened 6 years ago
Bugzilla Link | PR36970 |
Status | NEW |
Importance | P normal |
Reported by | David van Laatum (david@vanlaatum.id.au) |
Reported on | 2018-03-31 23:38:02 -0700 |
Last modified on | 2018-04-02 11:43:15 -0700 |
Version | 6.0 |
Hardware | Macintosh MacOS X |
CC | llvm-bugs@lists.llvm.org, vsk@apple.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
You might be seeing this issue because the linker is visiting static archives in a different order. If it visits the profile runtime archive before libcoveragedumper-clang.a, it will import __llvm_profile_runtime from the profile runtime first, and then unconditionally import it again from libcoveragedumper-clang.a.
The order in which the profile runtime archive is specified to the linker, in relation to other archives, hasn't changed since 5.0.
To break the dependence on the linker's visitation order, you could define a static int __llvm_profile_runtime
in each .o file.