summaryrefslogtreecommitdiffstats
path: root/lld/include
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2015-04-20 22:52:56 +0000
committerDavide Italiano <davide@freebsd.org>2015-04-20 22:52:56 +0000
commit30326b9d8fff67ccedbad622ec4048862f40fa34 (patch)
tree3a3586f573fc866e03da1e82b89954f266887110 /lld/include
parent2fbe13540a906cdb10a26889ab5c181ce242f563 (diff)
downloadbcm5719-llvm-30326b9d8fff67ccedbad622ec4048862f40fa34.tar.gz
bcm5719-llvm-30326b9d8fff67ccedbad622ec4048862f40fa34.zip
[GNU/ELF] Add support for -X/--discard-locals.
There's (almost) never need to keep .L symbols around for production builds. In fact, the FreeBSD kernel explicitly specify -X beacuse the size impact (and the subsequent performance impact) might be significant, because we keep symbols in memory. I was tempted to make this the default, but I haven't (yet). PR: 23232 llvm-svn: 235357
Diffstat (limited to 'lld/include')
-rw-r--r--lld/include/lld/ReaderWriter/ELFLinkingContext.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/include/lld/ReaderWriter/ELFLinkingContext.h b/lld/include/lld/ReaderWriter/ELFLinkingContext.h
index 7f1e7307e7a..28c6ce11e01 100644
--- a/lld/include/lld/ReaderWriter/ELFLinkingContext.h
+++ b/lld/include/lld/ReaderWriter/ELFLinkingContext.h
@@ -314,6 +314,10 @@ public:
bool discardLocals() const { return _discardLocals; }
void setDiscardLocals(bool d) { _discardLocals = d; }
+ /// \brief Discard temprorary local symbols.
+ bool discardTempLocals() const { return _discardTempLocals; }
+ void setDiscardTempLocals(bool d) { _discardTempLocals = d; }
+
/// \brief Strip symbols.
bool stripSymbols() const { return _stripSymbols; }
void setStripSymbols(bool strip) { _stripSymbols = strip; }
@@ -370,6 +374,7 @@ protected:
bool _noAllowDynamicLibraries = false;
bool _mergeRODataToTextSegment = true;
bool _demangle = true;
+ bool _discardTempLocals = false;
bool _discardLocals = false;
bool _stripSymbols = false;
bool _alignSegments = true;
OpenPOWER on IntegriCloud