<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - duplicate symbol ___llvm_profile_runtime"
href="https://bugs.llvm.org/show_bug.cgi?id=36970">36970</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>duplicate symbol ___llvm_profile_runtime
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david@vanlaatum.id.au
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre><a href="http://releases.llvm.org/6.0.0/tools/clang/docs/SourceBasedCodeCoverage.html#using-the-profiling-runtime-without-static-initializers">http://releases.llvm.org/6.0.0/tools/clang/docs/SourceBasedCodeCoverage.html#using-the-profiling-runtime-without-static-initializers</a>
says
Export a int __llvm_profile_runtime symbol from each instrumented shared
library and executable. When the linker finds a definition of this symbol, it
knows to skip loading the object which contains the profiling runtime’s static
initializer.
/opt/local/bin/clang++-mp-6.0 -Weverything -fcolor-diagnostics
-fcomment-block-commands=requirement,internal,endinternal,nosubgrouping
-fdebug-macro -fdiagnostics-color -fdiagnostics-show-template-tree
-fmessage-length=160 -fspell-checking -fstrict-aliasing -Qunused-arguments
-Wno-c++98-compat -Wno-c++98-compat-bind-to-temporary-copy
-Wno-c++98-compat-pedantic -Wno-c99-extensions -Wno-covered-switch-default
-Wno-documentation-unknown-command -Wno-error=unknown-pragmas
-Wno-exit-time-destructors -Wno-global-constructors -Wno-long-long
-Wno-missing-prototypes -Wno-packed -Wno-padded -Wno-reserved-id-macro
-Wno-undef -Wno-unknown-pragmas -Wno-unused-command-line-argument
-Wno-used-but-marked-unused -Wno-variadic-macros -Wno-weak-vtables
-Wno-zero-as-null-pointer-constant -Wno-unknown-warning-option -Werror -g
-dynamiclib -Wl,-headerpad_max_install_names -o
testproject/libatestlibrary.dylib -install_name @rpath/libatestlibrary.dylib
testproject/CMakeFiles/atestlibrary.dir/atestfile.cpp.o
testproject/CMakeFiles/atestlibrary.dir/auntestedfile.cpp.o
-fprofile-instr-generate -fcoverage-mapping src/libcoveragedumper-clang.a
-Wl,-u,_main_coverage_reset,-u,_main_coverage_dump && :
duplicate symbol ___llvm_profile_runtime in:
/opt/local/libexec/llvm-6.0/lib/clang/6.0.0/lib/darwin/libclang_rt.profile_osx.a(InstrProfilingRuntime.cc.o)
src/libcoveragedumper-clang.a(coveragedumper.cpp.o)
ld: 1 duplicate symbol for architecture x86_64
extern "C" int __llvm_profile_runtime() { return 0; }
This works with 5.0.0</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>