llvm-project/llvm/lib
Xin Tong 59cb7782cb Allow suppressing host and target info in VersionPrinter
Summary:
VersionPrinter by default outputs information about the Host CPU
and Default target. Printing this information requires linking in
a large amount of data, such as supported target triples as C
strings, which in turn bloats the binary size.

Enable a new CMake option LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO
which controls printing of the host and target info. This allows
the target triple names to be dead-code stripped. This is a nice
win for LLVM clients that wish to minimize their binary size, such
as graphics drivers.

By default this is ON, so there is no change in the default behavior.
Clients who wish to suppress this printing can do so by setting this
option to off via CMake.

A test app on Linux that uses ParseCommandLineOptions() shows a binary
size reduction of 23KB (from 149K to 126K) for a Release build, and 24KB
(from 135K to 111K) in a MinSizeRel build.

Reviewers: klimek, beanz, bogner, chandlerc, compnerd

Reviewed By: compnerd

Patch by pammon (Peter Ammon) !

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D30904

llvm-svn: 300630
2017-04-19 00:03:36 +00:00
..
Analysis Add a getPointerOperandType() helper to LoadInst and StoreInst; NFC 2017-04-18 22:00:54 +00:00
AsmParser [IR] Take func, ret, and arg attrs separately in AttributeList::get 2017-04-13 00:58:09 +00:00
Bitcode PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
CodeGen [X86] Keep EXTRACT_VECTOR_ELT result type as f128 for Android x86_64. 2017-04-18 20:15:18 +00:00
DebugInfo Add GNU_discriminator support for inline callsites in llvm-symbolizer. 2017-04-17 20:10:39 +00:00
Demangle Add support for demangling C++11 thread_local variables. 2017-01-31 15:56:36 +00:00
ExecutionEngine [APInt] Use lshrInPlace to replace lshr where possible 2017-04-18 17:14:21 +00:00
Fuzzer [libFuzzer] experimental option -cleanse_crash: tries to replace all bytes in a crash reproducer with garbage, while still preserving the crash 2017-04-17 20:58:21 +00:00
IR [ConstantRange] Optimize APInt creation in getSignedMax/getSignedMin. 2017-04-18 23:02:39 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO Object, LTO: Add target triple to irsymtab and LTO API. 2017-04-14 02:55:06 +00:00
LibDriver Fix some ArgList uses after API change in r300135. 2017-04-12 23:43:58 +00:00
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
MC Distinguish between code pointer size and DataLayout::getPointerSize() in DWARF info generation 2017-04-17 17:41:25 +00:00
Object Object: Shrink the size of irsymtab::Symbol by a word. NFCI. 2017-04-17 23:43:49 +00:00
ObjectYAML Add virtual destructor to WasmYAML::Section or avoid memory leak 2017-03-31 22:14:14 +00:00
Option ArgList: cache index ranges containing arguments with each ID 2017-04-12 23:19:51 +00:00
Passes MemorySSA: Move to Analysis, from Transforms/Utils. It's used as 2017-04-11 20:06:36 +00:00
ProfileData [ProfileData] Unify getInstrProf*SectionName helpers 2017-04-15 00:09:57 +00:00
Support Allow suppressing host and target info in VersionPrinter 2017-04-19 00:03:36 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target [AVR] Fix the build 2017-04-18 23:53:10 +00:00
Transforms Add a getPointerOperandType() helper to LoadInst and StoreInst; NFC 2017-04-18 22:00:54 +00:00
XRay [XRay] - Fix spelling error to test commit access. 2017-04-06 03:32:01 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt