[llvm-dev] clang-cl with PGO hits linker errors

David Major via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 20 14:36:50 PST 2018


I'm attempting to build Firefox on Windows using clang-cl with
-fprofile-instr-generate (*), but I'm running into some linker errors that
I haven't been able to make sense of.

lld-link.exe: error: duplicate symbol: __profc_?width at ios_base@std@@QEBA_JXZ
in minidump-analyzer.obj and in
..\google-breakpad\src\processor\basic_code_modules.obj
lld-link.exe: error: duplicate symbol: __profc_?flags at ios_base@std@@QEBAHXZ
in minidump-analyzer.obj and in
..\google-breakpad\src\processor\basic_code_modules.obj
lld-link.exe: error: duplicate symbol: __profc_?rdbuf@?$basic_ios at DU
?$char_traits at D@std@@@std@@QEBAPEAV?$basic_streambuf at DU?$char_traits at D@std@
@@2 at XZ in minidump-analyzer.obj and in
..\google-breakpad\src\processor\basic_code_modules.obj

and several dozen more like this, all with a __profc_ prefix.

I had hoped to isolate this by linking some small test files that use
iostreams, but they didn't reproduce the error.

Does anybody have advice on how to debug this?

Thanks,
David

(*) It seems that -fprofile-instr-generate is my only option for PGO, as
clang-cl.exe rejects both -fprofile-generate and -Xclang
-fprofile-generate. (Is this intentional?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180220/7b2bf916/attachment.html>


More information about the llvm-dev mailing list