1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/utils
Tom Stellard fb33bc86b6 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
..
benchmark [benchmark] Fix win32 link on case-sensitive fs 2019-07-30 20:47:59 +00:00
bugpoint [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
count Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
crosstool
docker [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +00:00
emacs [TableGen] Update editor modes for new keywords. 2020-01-14 13:39:00 +00:00
FileCheck [FileCheck] Given multiple -dump-input, prefer most verbose 2019-12-03 14:21:13 -05:00
fpcmp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
gdb-scripts Add gdb pretty printer for MutableArrayRef, remove ConstArrayRef. 2020-01-09 22:43:45 +01:00
git-svn git-llvm: Add option to push to Github with SSH 2019-12-16 16:51:43 -05:00
gn [gn build] Port 36fcbb838c8 2020-01-14 19:06:58 +00:00
jedit
kate [TableGen] Update editor modes for new keywords. 2020-01-14 13:39:00 +00:00
KillTheDoctor Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
lint
lit Make check-llvm run 50% faster on macOS, 18% faster on Windows. 2020-01-06 12:57:42 -05:00
llvm-build Write the RequiredLibraries for 'all' in LibraryDependencies.inc in a deterministic order (PR42739) 2019-08-05 13:04:07 +00:00
llvm-lit [lit] llvm-lit.in: specify file encoding to UTF-8 2019-01-14 20:02:11 +00:00
llvm-locstats Re-land "[cmake] Add dependency on llvm-dwarfdump to llvm-locstats" 2019-12-20 09:11:07 +00:00
LLVMVisualizers Clean up MSVC visualization of LLVM pointer types 2019-06-30 21:54:34 +00:00
Misc
not Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PerfectShuffle Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
release export.sh: Fetch sources from GitHub instead of SVN 2019-12-06 18:57:08 -08:00
Reviewing [find_interesting_reviews.py] Add git blame output cache 2019-12-23 12:08:16 +00:00
sanitizers
TableGen [X86][Disassembler] Shrink X86GenDisassemblerTables.inc from 36M to 6.1M 2020-01-11 17:28:22 -08:00
Target/ARM
testgen
textmate
unittest CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
UpdateTestChecks update_test_checks: match CHECK-EMPTY lines for replacement. 2020-01-02 12:17:37 -05:00
valgrind
vim [TableGen] Update editor modes for new keywords. 2020-01-14 13:39:00 +00:00
vscode [TableGen] Update editor modes for new keywords. 2020-01-14 13:39:00 +00:00
yaml-bench Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
abtest.py
add_argument_names.py IR: print value numbers for unnamed function arguments 2019-08-03 14:28:34 +00:00
bisect [utils] Fix incompatibility of bisect[-skip-count] with Python 3 2019-10-04 16:44:18 +00:00
bisect-skip-count [utils] Fix incompatibility of bisect[-skip-count] with Python 3 2019-10-04 16:44:18 +00:00
bugpoint_gisel_reducer.py
check-each-file
chunk-print-before-all.py [Util] Add a helper script for converting -print-before-all output into a file based equivelent 2019-06-19 22:05:47 +00:00
clang-parse-diagnostics-file
codegen-diff
collect_and_build_with_pgo.py
countloc.sh Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
create_ladder_graph.py Pythran compat - range vs. xrange 2019-01-03 14:11:58 +00:00
demangle_tree.py
DSAclean.py
DSAextract.py
extract_symbols.py Use portable flag with nm in extract_symbols.py 2019-10-23 16:48:22 -04:00
extract_vplan.py
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
GetRepositoryPath
GetSourceVersion
getsrcs.sh Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
indirect_calls.py
lldbDataFormatters.py Add LLDB dataformatters for llvm::StringRef and lldb_private::ConstString 2019-08-16 23:47:57 +00:00
llvm-compilers-check Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-gisel-cov.py
llvm-native-gxx
llvm.grm
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvmdo Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvmgrep Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
prepare-code-coverage-artifact.py svn propset svn:executable on utils/prepare-code-coverage-artifact.py 2019-06-04 23:35:07 +00:00
schedcover.py Python compat - map/filter 2019-01-03 14:12:30 +00:00
shuffle_fuzz.py Pythran compat - range vs. xrange 2019-01-03 14:11:58 +00:00
shuffle_select_fuzz_tester.py
sort_includes.py
unicode-case-fold.py Python compat - urllib 2019-01-03 14:12:44 +00:00
update_analyze_test_checks.py [UpdateTestChecks] Change shebang from python to python3 2019-12-03 13:50:07 -08:00
update_cc_test_checks.py Make mangled_names.test and update_cc_test_checks.py work with Python 2. 2020-01-02 13:45:39 -05:00
update_llc_test_checks.py [UpdateTestChecks] Change shebang from python to python3 2019-12-03 13:50:07 -08:00
update_mca_test_checks.py [UpdateTestChecks] Change shebang from python to python3 2019-12-03 13:50:07 -08:00
update_mir_test_checks.py [UpdateTestChecks] Change shebang from python to python3 2019-12-03 13:50:07 -08:00
update_test_checks.py [Utils] Allow update_test_checks to scrub attribute annotations 2019-12-31 01:51:22 -06:00
UpdateCMakeLists.pl
wciia.py