-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[llvm-profdata] nodeduplicate has been violated! #50736
Comments
Can you explain your setup a bit more. What do you mean by "Not using LTO works fine"? I assume that in that case, you aren't using llvm-link, but a linker such as lld? Is there a reason for using llvm-link instead of linker in the LTO case? I think the problem is that llvm-link implements a slightly different semantics from traditional linkers. If I use lld with this reproducer, even in the LTO mode it works fine. |
Yeah, sorry, I didn't provide enough context. We found this problem with a couple of games using our PS4 toolchain, which uses a proprietary linker and, for LTO, a proprietary tool that is invoked by the linker and uses LTO.dll (on Windows of course). What I meant with "does not occur with LTO" was that a straight compile-and-link without -flto produces a valid executable, indicating that the input is valid. With the current upstream version I was only able to reproduce with llvm-link and llvm-lto. Using lld did not fail for me either. I'm hoping that this is enough to go on. |
I have uploaded https://reviews.llvm.org/D108689 as one potential solution. |
mentioned in issue #51040 |
Solution has landed. |
Extended Description
After c24b7a1 we get the error in the subject line with -flto -fprofile-instr-generate:
1.cpp:
attribute((weak)) void f(){};
2.cpp:
int main(){}
error: Linking COMDATs named '__profc__Z1fv': nodeduplicate has been violated!
This is a reduction from a large application (game) from one of our licensees.
Not using LTO works fine.
The text was updated successfully, but these errors were encountered: