[PATCH] D73577: [compiler-rt] Build all alias in builtin as private external on Darwin
Steven Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 14:06:13 PST 2020
steven_wu updated this revision to Diff 240987.
steven_wu added a comment.
Conditionalize the .private_extern based on VISIBILITY_HIDDEN macro
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73577/new/
https://reviews.llvm.org/D73577
Files:
compiler-rt/lib/builtins/int_lib.h
Index: compiler-rt/lib/builtins/int_lib.h
===================================================================
--- compiler-rt/lib/builtins/int_lib.h
+++ compiler-rt/lib/builtins/int_lib.h
@@ -52,8 +52,15 @@
#define COMPILER_RT_ALIAS(name, aliasname) \
COMPILER_RT_ABI __typeof(name) aliasname __attribute__((__alias__(#name)));
#elif defined(__APPLE__)
+#if defined(VISIBILITY_HIDDEN)
+#define COMPILER_RT_ALIAS_VISIBILITY(name) \
+ __asm__(".private_extern " SYMBOL_NAME(name));
+#else
+#define COMPILER_RT_ALIAS_VISIBILITY(name)
+#endif
#define COMPILER_RT_ALIAS(name, aliasname) \
__asm__(".globl " SYMBOL_NAME(aliasname)); \
+ COMPILER_RT_ALIAS_VISIBILITY(aliasname) \
__asm__(SYMBOL_NAME(aliasname) " = " SYMBOL_NAME(name)); \
COMPILER_RT_ABI __typeof(name) aliasname;
#elif defined(_WIN32)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73577.240987.patch
Type: text/x-patch
Size: 814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200128/80ec1fce/attachment.bin>
More information about the llvm-commits
mailing list