This is an archive of the discontinued LLVM Phabricator instance.

Link LLVM_PTHREAD_LIB to lldCommon
AcceptedPublic

Authored by Vulder on Oct 17 2017, 6:03 AM.

Details

Reviewers
ruiu
zturner
Summary

The lldCommon library requires pthreads linkage.

In case of building LLVM_SHARED_LIBS we need to
link this explicitly.

Fixes issue from mailing list, posted from dean.berris@gmail.com.

Diff Detail

Event Timeline

Vulder created this revision.Oct 17 2017, 6:03 AM

Small remark:

One could also link LLVM_PTHREAD_LIB always, to indicate the dependence to pthread.
ruiu accepted this revision.Oct 17 2017, 10:41 AM

LGTM

This revision is now accepted and ready to land.Oct 17 2017, 10:41 AM

If accepted could you please also commit it? I don't have commit access.

ruiu added inline comments.Oct 17 2017, 3:02 PM
Common/CMakeLists.txt
22

Well, why can't you just add ${LLVM_PTHREAD_LIB} here?

ruiu added a comment.Oct 17 2017, 5:01 PM

Alexander Richardson submitted https://reviews.llvm.org/rL315988 instead.

Vulder marked an inline comment as done.Oct 18 2017, 12:41 AM
Vulder added inline comments.
Common/CMakeLists.txt
22

this should also work, like I mentioned above.

Small remark:

One could also link LLVM_PTHREAD_LIB always, to indicate the dependence to pthread.

Should I update or do you just take the other submission?

Vulder updated this revision to Diff 119456.Oct 18 2017, 4:05 AM
Vulder marked an inline comment as done.

I updated the version to always link PTHREAD

ruiu added a comment.Oct 18 2017, 11:54 AM

The same change was submitted in https://reviews.llvm.org/rL315988 by Alexander Richardson, so we don't need to submit this patch anymore.