1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/unittests
Tom Stellard 5311f9a49e CMake: Make most target symbols hidden by default
Summary:
For builds with LLVM_BUILD_LLVM_DYLIB=ON and BUILD_SHARED_LIBS=OFF
this change makes all symbols in the target specific libraries hidden
by default.

A new macro called LLVM_EXTERNAL_VISIBILITY has been added to mark symbols in these
libraries public, which is mainly needed for the definitions of the
LLVMInitialize* functions.

This patch reduces the number of public symbols in libLLVM.so by about
25%.  This should improve load times for the dynamic library and also
make abi checker tools, like abidiff require less memory when analyzing
libLLVM.so

One side-effect of this change is that for builds with
LLVM_BUILD_LLVM_DYLIB=ON and LLVM_LINK_LLVM_DYLIB=ON some unittests that
access symbols that are no longer public will need to be statically linked.

Before and after public symbol counts (using gcc 8.2.1, ld.bfd 2.31.1):
nm before/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
36221
nm after/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
26278

Reviewers: chandlerc, beanz, mgorny, rnk, hans

Reviewed By: rnk, hans

Subscribers: Jim, hiraditya, michaelplatings, chapuni, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, mgrang, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, kristina, jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 362990
2019-06-10 22:12:56 +00:00
..
ADT [ADT] Enable set_difference() to be used on StringSet 2019-06-07 20:23:03 +00:00
Analysis [Analysis] add unit test file for VectorUtils; NFC 2019-06-10 18:19:05 +00:00
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryFormat [MsgPack] Removed MsgPackTypes 2019-03-13 18:56:33 +00:00
Bitcode Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
CodeGen [X86] Fix several places that weren't passing what they though they were to MachineInstr::print 2019-06-02 01:36:48 +00:00
DebugInfo Fix DWARF DebugInfo unit test errors when cross-compiling 2019-06-03 22:22:03 +00:00
Demangle Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
ExecutionEngine [ORC] Update symbol lookup to use a single callback with a required symbol state 2019-06-07 19:33:51 +00:00
FuzzMutate Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IR [IRBuilder] Add CreateFNegFMF(...) to the IRBuilder 2019-06-10 15:07:29 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
MC Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef() 2019-04-07 03:58:42 +00:00
MI MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
Object Minidump: Add support for the MemoryList stream 2019-05-16 15:17:30 +00:00
ObjectYAML Minidump: Add support for reading/writing strings 2019-04-05 08:06:26 +00:00
Option Option spell checking: Penalize delimiter flags if input has no argument 2019-05-01 16:45:15 +00:00
Passes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProfileData [SampleFDO] add suffix elision control for fcn names 2019-03-14 13:56:49 +00:00
Remarks [Remarks] Add string deduplication using a string table 2019-04-24 00:06:24 +00:00
Support FileCheck [6/12]: Introduce numeric variable definition 2019-06-06 13:21:06 +00:00
Target CMake: Make most target symbols hidden by default 2019-06-10 22:12:56 +00:00
TextAPI [TextAPI] Prefix all architecture enums to fix the build on i386. 2019-04-04 22:56:50 +00:00
tools CMake: Make most target symbols hidden by default 2019-06-10 22:12:56 +00:00
Transforms [DebugInfoMetadata] Refactor DIExpression::prepend constants (NFC) 2019-05-20 10:35:57 +00:00
XRay Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt CMake: Make most target symbols hidden by default 2019-06-10 22:12:56 +00:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00