llvm-project/llvm/lib/Target/Lanai
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
..
AsmParser CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
Disassembler CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
MCTargetDesc CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
TargetInfo CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
CMakeLists.txt [Lanai] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:25:58 +00:00
LLVMBuild.txt [Lanai] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:25:58 +00:00
Lanai.h Include what you use in Lanai.h 2019-06-03 17:02:15 +00:00
Lanai.td
LanaiAluCode.h
LanaiAsmPrinter.cpp CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
LanaiCallingConv.td
LanaiCondCode.h
LanaiDelaySlotFiller.cpp [NFC] Test commit, fix some comment spelling. 2019-08-20 05:21:27 +00:00
LanaiFrameLowering.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
LanaiFrameLowering.h [Alignment][NFC] Use Align for TargetFrameLowering/Subtarget 2019-10-17 07:49:39 +00:00
LanaiISelDAGToDAG.cpp Include what you use in LanaiISelDAGToDAG.cpp 2019-06-03 17:01:57 +00:00
LanaiISelLowering.cpp CodeGen: Use LLT instead of EVT in getRegisterByName 2020-01-09 17:37:52 -05:00
LanaiISelLowering.h CodeGen: Use LLT instead of EVT in getRegisterByName 2020-01-09 17:37:52 -05:00
LanaiInstrFormats.td
LanaiInstrInfo.cpp Fix assertion failure in getMemOperandWithOffsetWidth 2019-12-17 10:56:09 +00:00
LanaiInstrInfo.h Use MCRegister in copyPhysReg 2019-11-11 14:42:33 +05:30
LanaiInstrInfo.td
LanaiMCInstLower.cpp
LanaiMCInstLower.h
LanaiMachineFunctionInfo.cpp
LanaiMachineFunctionInfo.h
LanaiMemAluCombiner.cpp Include what you use in LanaiMemAluCombiner.cpp 2019-06-03 17:02:02 +00:00
LanaiRegisterInfo.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
LanaiRegisterInfo.h CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
LanaiRegisterInfo.td
LanaiSchedule.td
LanaiSelectionDAGInfo.cpp
LanaiSelectionDAGInfo.h
LanaiSubtarget.cpp
LanaiSubtarget.h
LanaiTargetMachine.cpp CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
LanaiTargetMachine.h
LanaiTargetObjectFile.cpp Revert "Honor -fuse-init-array when os is not specified on x86" 2019-12-17 07:36:59 -08:00
LanaiTargetObjectFile.h
LanaiTargetTransformInfo.h Rename TTI::getIntImmCost for instructions and intrinsics 2019-12-11 18:00:20 -08:00