This is an archive of the discontinued LLVM Phabricator instance.

Fix unavailability of __thread_id on external builds
ClosedPublic

Authored by mclow.lists on Aug 20 2019, 8:20 AM.

Details

Summary

In fixing https://bugs.llvm.org/show_bug.cgi?id=42918 (r368916), I broke external threading support.
This should fix that

I don't have an external threading setup, so I'd appreciate it if someone who had one could test this.
I have tested with pthreads and with no-threads.

Diff Detail

Event Timeline

mclow.lists created this revision.Aug 20 2019, 8:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2019, 8:20 AM
ldionne accepted this revision.Aug 20 2019, 8:43 AM
This revision is now accepted and ready to land.Aug 20 2019, 8:43 AM

The code _looks_ alright, but can @DavidSpickett please validate?

This revision now requires review to proceed.Aug 20 2019, 8:48 AM
DavidSpickett accepted this revision.Aug 20 2019, 9:07 AM

Fixes the build for us and is neater than my solution. LGTM

This revision is now accepted and ready to land.Aug 20 2019, 9:07 AM
mclow.lists closed this revision.Aug 20 2019, 9:15 AM

Committed as revision 369399.

Apologies for the back and forth, I had my local builds mis-configured so the success was my mistake. I've put up a small change at https://reviews.llvm.org/D66518 that should fix things.