Handle lack of weak symbols on some platforms
authorPeter Griess <pgriess@fb.com>
Mon, 23 Sep 2013 23:25:18 +0000 (18:25 -0500)
committerPeter Griess <pgriess@fb.com>
Tue, 26 Nov 2013 15:05:18 +0000 (07:05 -0800)
commita0fe3c18976a67c4ebea16f986d86e98e9489706
treee6e3b50f82cfe6dc070680655b0eec3a36eaf349
parent758e4c7773f067231bec9739caac165dde9442f9
Handle lack of weak symbols on some platforms

Summary:
- It turns out that it's not always desirable to perform runtime
resolution of weak symbols. For example, on iOS, weak symbols are
resolved at runtime only if *all* symbol resolution is deferred util
then, which is undesirable for othe reasons. Detect such platforms at
configure time and use that information to populate detail/Malloc.h
with the correct declarations: weak symbols or extern symbols with
a value of nullptr.

Test Plan:
- fbconfig -r folly && fbmake runtests
- ./configure && make check on Ubuntu/FC/Mac

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1002959
folly/Makefile.am
folly/Malloc.h
folly/configure.ac
folly/detail/Malloc.cpp [new file with mode: 0644]
folly/detail/Malloc.h [new file with mode: 0644]
folly/detail/ThreadLocalDetail.h