Skip to content
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

Use -pthread #1509

Merged
merged 4 commits into from
Sep 15, 2021
Merged

Use -pthread #1509

merged 4 commits into from
Sep 15, 2021

Conversation

ellert
Copy link
Contributor

@ellert ellert commented Sep 7, 2021

This is a follow-up to the discussion in #1506.
Using ${CMAKE_THREAD_LIBS_INIT} everywhere is more consistent than doing a one-off for the one place where it is strictly necessary.
This also avoids that things break elsewhere in the future if some other part of the code starts using new parts of std::atomic that need libatomic.

Prefer -pthread over -lpthread if supported by the compiler
This reverts commit 39fcbc8.

The -pthread option implies linking to libatomic on riscv64. No need to
explicitly link to libatomic if -pthread is used instead of -lpthread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants