[llvm-bugs] [Bug 36970] New: duplicate symbol ___llvm_profile_runtime
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Mar 31 23:38:02 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=36970
Bug ID: 36970
Summary: duplicate symbol ___llvm_profile_runtime
Product: clang
Version: 6.0
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: david at vanlaatum.id.au
CC: llvm-bugs at lists.llvm.org
http://releases.llvm.org/6.0.0/tools/clang/docs/SourceBasedCodeCoverage.html#using-the-profiling-runtime-without-static-initializers
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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180401/21fa1bc1/attachment.html>
More information about the llvm-bugs
mailing list