llvm-project/llvm/lib/Target/ARM/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
..
ARMAddressingModes.h [ARM] Rename NEONModImm to VMOVModImm. NFC 2019-07-23 09:19:24 +00:00
ARMAsmBackend.cpp MCRegisterInfo: Merge getLLVMRegNum and getLLVMRegNumFromEH 2019-09-24 09:31:02 +00:00
ARMAsmBackend.h [ARM] Support .reloc *, R_ARM_NONE, * 2019-05-17 02:51:54 +00:00
ARMAsmBackendDarwin.h
ARMAsmBackendELF.h
ARMAsmBackendWinCOFF.h
ARMBaseInfo.h [ARM][MVE] validForTailPredication insts 2019-10-15 13:12:51 +00:00
ARMELFObjectWriter.cpp [MC][ARM] Delete MCSection::HasData and move SHF_ARM_PURECODE logic to ARMELFObjectWriter::addTargetSectionFlags 2020-01-05 14:20:34 -08:00
ARMELFStreamer.cpp MCObjectStreamer: assign MCSymbols in the dummy fragment to offset 0. 2019-11-16 09:52:07 -05:00
ARMFixupKinds.h [ARM] Add the non-MVE instructions in Arm v8.1-M. 2019-06-11 09:29:18 +00:00
ARMInstPrinter.cpp [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
ARMInstPrinter.h [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
ARMMCAsmInfo.cpp Revert "[ARM] Uses "Sun Style" syntax for section switching" 2019-10-25 14:03:07 -07:00
ARMMCAsmInfo.h
ARMMCCodeEmitter.cpp [ARM] Fix encoding of APSR in CLRM instruction 2019-08-13 16:12:46 +00:00
ARMMCExpr.cpp
ARMMCExpr.h
ARMMCTargetDesc.cpp CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
ARMMCTargetDesc.h [ARM] Set up infrastructure for MVE vector instructions. 2019-06-13 13:11:13 +00:00
ARMMachORelocationInfo.cpp
ARMMachObjectWriter.cpp [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +00:00
ARMTargetStreamer.cpp [ARM] VFPv2 only supports 16 D registers. 2019-09-17 21:42:38 +00:00
ARMUnwindOpAsm.cpp [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
ARMUnwindOpAsm.h [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
ARMWinCOFFObjectWriter.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
ARMWinCOFFStreamer.cpp [MC] Pass through .code16/32/64 and .syntax unified for COFF 2019-09-03 18:16:52 +00:00
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LLVMBuild.txt