diff options
author | Ryan Prichard <rprichard@google.com> | 2021-01-07 17:49:29 -0800 |
---|---|---|
committer | Ryan Prichard <rprichard@google.com> | 2021-01-07 17:53:44 -0800 |
commit | 658a1be76ba2e9880bc1dd530869a45be452344c (patch) | |
tree | 75fbe4575d63b2fdcd1f44abade368a75564806f /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 48baa7f5b11cbe6b00711864a19cd8b722f5940d (diff) | |
download | llvm-658a1be76ba2e9880bc1dd530869a45be452344c.zip llvm-658a1be76ba2e9880bc1dd530869a45be452344c.tar.gz llvm-658a1be76ba2e9880bc1dd530869a45be452344c.tar.bz2 |
[builtins] Add COMPILER_RT_BUILTINS_HIDE_SYMBOLS
On Android, when the builtins are linked into a binary, they are
typically linked using -Wl,--exclude-libs so that the symbols aren't
reexported. For the NDK, compiler-rt's default behavior (build the
builtins archive with -fvisibility=hidden) is better so that builtins
are hidden even without -Wl,--exclude-libs.
Android needs the builtins with non-hidden symbols only for a special
case: for backwards compatibility with old binaries, the libc.so and
libm.so DSOs in the platform need to export some builtins for arm32 and
32-bit x86. See D56977.
Control the behavior with a new flag,
`COMPILER_RT_BUILTINS_HIDE_SYMBOLS`, that behaves similarly to the
`*_HERMETIC_STATIC_LIBRARY` in libunwind/libcxx/libcxxabi, so that
Android can build a special builtins variant for libc.so/libm.so.
Unlike the hermetic flags for other projects, this new flag is enabled
by default.
Reviewed By: compnerd, MaskRay
Differential Revision: https://reviews.llvm.org/D93431
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions