~smspillaz/folly/folly-git-master

Viewing all changes in revision 7189.

  • Committer: Facebook Github Bot
  • Author(s): Yedidya Feldblum
  • Date: 2019-05-25 01:38:53 UTC
  • Revision ID: git-v1:2320c70cfbc4eba6f0b7b65d6875c103079dd4f2
Disable TLS optimization in PIC mode for SingletonThreadLocal

Summary:
[Folly] Disable TLS optimization in PIC mode for `SingletonThreadLocal`.

In PIC mode, TLS offsets must be translated to addresses at runtime via calls to `__tls_get_addr`. Since there is not much of a small inline path or a fast inline fast path anymore anyway in PIC mode, might as well skip the bulky slow caching.

Also, some versions of gcc do not properly support this code in shared libraries. Details in #1135 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90562.

Fixes #1135.

Reviewed By: andriigrynenko

Differential Revision: D15468086

fbshipit-source-id: 038e13f900fe56205c1333a620ea3bfa468c47ad

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: