[libunwind] Export the weak alias in Mach-O

This is not necessary for ELF since .globl and .weak are mutually
exclusive, but is necessary for Mach-O otherwise the symbol isn't
visible externally.

Differential Revision: https://reviews.llvm.org/D60245

llvm-svn: 357671
This commit is contained in:
Petr Hosek 2019-04-04 03:36:35 +00:00
parent 8238604259
commit ee676e2f6f

View File

@ -47,6 +47,7 @@
#define HIDDEN_SYMBOL(name) .private_extern name
#define WEAK_SYMBOL(name) .weak_reference name
#define WEAK_ALIAS(name, aliasname) \
.globl SYMBOL_NAME(aliasname) SEPARATOR \
WEAK_SYMBOL(aliasname) SEPARATOR \
SYMBOL_NAME(aliasname) = SYMBOL_NAME(name)