Fix Singleton/ThreadLocal destruction order crashes in buck dev builds
authorAndrii Grynenko <andrii@fb.com>
Fri, 12 Feb 2016 18:22:25 +0000 (10:22 -0800)
committerfacebook-github-bot-0 <folly-bot@fb.com>
Fri, 12 Feb 2016 19:20:29 +0000 (11:20 -0800)
commitb01740268c9cba59c93741e8028afafe67a2d170
treed438524507d1f7d6a29de966d362c5099123ce81
parent1a7befdb10222e71db9da527ba13cbc8e236784b
Fix Singleton/ThreadLocal destruction order crashes in buck dev builds

Summary: This adds a folly::Singleton->folly::ThreadLocal dependency to make sure folly::ThreadLocal is always loaded first. Otherwise PthreadKeyUnregister singleton is created after folly::Singleton storage, even though it has higher priority.

Reviewed By: andrewjcg

Differential Revision: D2931170

fb-gh-sync-id: 36392d76e98201f2b4416b4bbef451d6c0e8c69d
shipit-source-id: 36392d76e98201f2b4416b4bbef451d6c0e8c69d
folly/Singleton.cpp