-
-
Notifications
You must be signed in to change notification settings - Fork 12
fix: Remove explicit libatomic dep on Linux #278
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
Conversation
|
Would we be able to satisfy it by linking to |
|
As I understand it, you need to link libatomic when your operations cannot be implemented using lock-free instructions. I'm not sure why it still wants it. |
jpnurmi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, so std::atomic<sentry_uuid_t> probably wasn't lock-free since it required libatomic? A manual mutex might not be as pretty but it gets the job done. 🙂 Alternatively, something like -Wl,-Bstatic -latomic -Wl,-Bdynamic or -l:libatomic.a might have also been a possibility to eliminate the runtime dependency.
|
Seems the 16 bytes is the key here. Anything up to 8 should be lock-free on most architectures. We could include it as static, but as we don't test ABI compatibility yet, I chose safer option. |
Remove dependency on
libatomic.so.1on Linux. This causes issues on some installations that don't have libatomic.so.1 installed (or GCC).