aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-07-18 14:13:05 +0300
committerMartin Storsjö <martin@martin.st>2022-08-12 00:57:05 +0300
commit2c2fb0c7375061147711cd21396d79faad7dfdfb (patch)
tree83a010fe17fb2573626dd6bfba52d7ff14f503da /lldb/packages/Python/lldbsuite/test/gdbclientutils.py
parenta5881e8a810bac74af2efcdcf12c741d52a1970a (diff)
downloadllvm-2c2fb0c7375061147711cd21396d79faad7dfdfb.zip
llvm-2c2fb0c7375061147711cd21396d79faad7dfdfb.tar.gz
llvm-2c2fb0c7375061147711cd21396d79faad7dfdfb.tar.bz2
[llvm] Use hidden visibility when building for MinGW with Clang
Since c5b3de6745c37dd991430b9b88ff97c35b6fc455 (git main, August 11th), Clang does generate working hidden visibility on MinGW targets. Using that reduces the number of exports from a dylib build of LLVM significantly, which is vital for fitting within the limit of 64k exported symbols from a DLL. It's essential that if we set CMAKE_CXX_VISIBILITY_PRESET=hidden (which passes -fvisibility=hidden on the command line), we also must define LLVM_EXTERNAL_VISIBILITY consistently to override it. (If there are mismatches, e.g. setting hidden visibility generally but never overriding it back to default for the symbols that do need to be exported, we'd get broken builds in such configurations.) We don't want to be using __attribute__((visibility("hidden"))) on MinGW with GCC, because GCC produces a warning about it. (GCC hasn't warned about the command line options that set hidden visibility though.) Clang has historically not warned about either of them, so it is harmless to use the hidden visibility when building with older Clang (so we don't need to detect the exact version of Clang/LLVM where it has an effect). This reduces the number of exported symbols for a dylib build of LLVM; previously libLLVM exported around 64650 symbols (when the maximum is 65536) when the ARM, AArch64 and X86 targets were enabled. If enabling more targets (or if building with e.g. assertions enabled), it would exceed the limit. Now with visibility flags in use, the same build with ARM, AArch64 and X86 ends up at around 35k exported symbols. Differential Revision: https://reviews.llvm.org/D131661
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/gdbclientutils.py')
0 files changed, 0 insertions, 0 deletions