[PATCH] D56977: [builtins] Do not set hidden attribute on Android
Yi Kong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 20 06:17:08 PST 2019
kongyi created this revision.
kongyi added reviewers: pirama, srhines, enh.
Herald added subscribers: Sanitizers, llvm-commits, mgorny.
Bionic libc relies on an old libgcc behaviour which does not set hidden visibility attribute. Keep exporting these symbols on Android for compatibility.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D56977
Files:
compiler-rt/lib/builtins/CMakeLists.txt
Index: compiler-rt/lib/builtins/CMakeLists.txt
===================================================================
--- compiler-rt/lib/builtins/CMakeLists.txt
+++ compiler-rt/lib/builtins/CMakeLists.txt
@@ -548,7 +548,9 @@
if(COMPILER_RT_STANDALONE_BUILD)
append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC BUILTIN_CFLAGS)
append_list_if(COMPILER_RT_HAS_FNO_BUILTIN_FLAG -fno-builtin BUILTIN_CFLAGS)
- append_list_if(COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG -fvisibility=hidden BUILTIN_CFLAGS)
+ if(NOT ANDROID)
+ append_list_if(COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG -fvisibility=hidden BUILTIN_CFLAGS)
+ endif()
if(NOT COMPILER_RT_DEBUG)
append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fomit-frame-pointer BUILTIN_CFLAGS)
endif()
@@ -556,7 +558,9 @@
set(BUILTIN_DEFS "")
- append_list_if(COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG VISIBILITY_HIDDEN BUILTIN_DEFS)
+ if(NOT ANDROID)
+ append_list_if(COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG VISIBILITY_HIDDEN BUILTIN_DEFS)
+ endif()
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
if (CAN_TARGET_${arch})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56977.182703.patch
Type: text/x-patch
Size: 1111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190120/80b8f2d7/attachment.bin>
More information about the llvm-commits
mailing list