llvm-project/llvm/lib/Target/Hexagon/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
..
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
HexagonAsmBackend.cpp Hexagon - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:16 +00:00
HexagonBaseInfo.h
HexagonELFObjectWriter.cpp [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +00:00
HexagonFixupKinds.h
HexagonInstPrinter.cpp [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
HexagonInstPrinter.h [MC] Add parameter `Address` to MCInstrPrinter::printInstruction 2020-01-06 20:44:14 -08:00
HexagonMCAsmInfo.cpp
HexagonMCAsmInfo.h
HexagonMCChecker.cpp [llvm-mc] Add reportWarning() to MCContext 2019-08-08 19:13:23 +00:00
HexagonMCChecker.h
HexagonMCCodeEmitter.cpp Include what you use in HexagonMCCodeEmitter.cpp 2019-06-03 11:20:53 +00:00
HexagonMCCodeEmitter.h Use bitset for assembler predicates 2019-03-11 17:04:35 +00:00
HexagonMCCompound.cpp [Hexagon] getCompoundCandidateGroup - fix 'false' value is implicitly cast to unsigned warning. NFCI. 2019-11-05 21:37:53 +00:00
HexagonMCDuplexInfo.cpp
HexagonMCELFStreamer.cpp [Alignment][NFC] Remove unneeded llvm:: scoping on Align types 2019-09-27 12:54:21 +00:00
HexagonMCELFStreamer.h
HexagonMCExpr.cpp
HexagonMCExpr.h
HexagonMCInstrInfo.cpp Include what you use in HexagonMCInstrInfo.cpp 2019-06-03 11:25:37 +00:00
HexagonMCInstrInfo.h
HexagonMCShuffler.cpp Include what you use in HexagonMCShuffler.cpp 2019-06-03 11:14:05 +00:00
HexagonMCShuffler.h
HexagonMCTargetDesc.cpp CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
HexagonMCTargetDesc.h [Hexagon] Create a TargetInfo header. NFC 2019-05-14 23:04:55 +00:00
HexagonShuffler.cpp Include what you use in HexagonShuffler.cpp 2019-06-03 11:14:20 +00:00
HexagonShuffler.h Include what you use in HexagonShuffler.h 2019-06-03 09:33:48 +00:00
LLVMBuild.txt