llvm-project/llvm/lib/Target/AArch64/MCTargetDesc
Tom Stellard 0dbcb36394 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: merge_guards_bot, luismarques, smeenai, ldionne, lenary, s.egerton, pzheng, sameer.abuasal, MaskRay, wuzish, echristo, Jim, hiraditya, michaelplatings, chapuni, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, 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
2020-01-14 19:46:52 -08:00
..
AArch64AddressingModes.h
AArch64AsmBackend.cpp [AArch64] Fix a bug with jump table generation 2019-12-06 14:31:53 +00:00
AArch64ELFObjectWriter.cpp [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +00:00
AArch64ELFStreamer.cpp
AArch64ELFStreamer.h
AArch64FixupKinds.h
AArch64InstPrinter.cpp [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
AArch64InstPrinter.h [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
AArch64MCAsmInfo.cpp AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64MCAsmInfo.h AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64MCCodeEmitter.cpp [AArch64] Output the pseudo SPACE in asm and object files 2019-11-01 15:01:53 +00:00
AArch64MCExpr.cpp MC: AArch64: Add support for prel_g* relocation specifiers. 2019-07-18 16:54:33 +00:00
AArch64MCExpr.h MC: AArch64: Add support for prel_g* relocation specifiers. 2019-07-18 16:54:33 +00:00
AArch64MCTargetDesc.cpp CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
AArch64MCTargetDesc.h [AArch64] Create a TargetInfo header. NFC 2019-05-14 21:33:53 +00:00
AArch64MachObjectWriter.cpp [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +00:00
AArch64TargetStreamer.cpp Add explicit dependencies on MCSection.h and MCDwarf.h to the .cpp 2019-04-12 07:40:01 +00:00
AArch64TargetStreamer.h
AArch64WinCOFFObjectWriter.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
AArch64WinCOFFStreamer.cpp
AArch64WinCOFFStreamer.h
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LLVMBuild.txt [AArch64] Move InstPrinter files to MCTargetDesc. NFC 2019-05-10 23:50:01 +00:00