2015-07-25 05:03:07 +08:00
|
|
|
set(LLVM_TARGET_DEFINITIONS Options.td)
|
|
|
|
tablegen(LLVM Options.inc -gen-opt-parser-defs)
|
|
|
|
add_public_tablegen_target(ELFOptionsTableGen)
|
|
|
|
|
2016-02-28 08:25:54 +08:00
|
|
|
add_lld_library(lldELF
|
2015-07-25 05:03:07 +08:00
|
|
|
Driver.cpp
|
|
|
|
DriverUtils.cpp
|
2015-08-06 23:08:23 +08:00
|
|
|
Error.cpp
|
2016-02-26 02:43:51 +08:00
|
|
|
ICF.cpp
|
2015-07-25 05:03:07 +08:00
|
|
|
InputFiles.cpp
|
2015-09-22 08:01:39 +08:00
|
|
|
InputSection.cpp
|
2015-10-01 01:23:26 +08:00
|
|
|
LinkerScript.cpp
|
ELF2: Implement --gc-sections.
Section garbage collection is a feature to remove unused sections
from outputs. Unused sections are sections that cannot be reachable
from known GC-root symbols or sections. Naturally the feature is
implemented as a mark-sweep garbage collector.
In this patch, I added Live bit to InputSectionBase. If and only
if Live bit is on, the section will be written to the output.
Starting from GC-root symbols or sections, a new function, markLive(),
visits all reachable sections and sets their Live bits. Writer then
ignores sections whose Live bit is off, so that such sections are
excluded from the output.
This change has small negative impact on performance if you use
the feature because making sections means more work. The time to
link Clang changes from 0.356s to 0.386s, or +8%.
It reduces Clang size from 57,764,984 bytes to 55,296,600 bytes.
That is 4.3% reduction.
http://reviews.llvm.org/D13950
llvm-svn: 251043
2015-10-23 02:49:53 +08:00
|
|
|
MarkLive.cpp
|
2015-09-22 05:38:08 +08:00
|
|
|
OutputSections.cpp
|
2015-07-25 05:03:07 +08:00
|
|
|
SymbolTable.cpp
|
|
|
|
Symbols.cpp
|
2015-09-23 02:19:46 +08:00
|
|
|
Target.cpp
|
2015-07-25 05:03:07 +08:00
|
|
|
Writer.cpp
|
|
|
|
|
|
|
|
LINK_COMPONENTS
|
2016-03-01 23:56:53 +08:00
|
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
|
|
BitReader
|
2016-03-10 05:38:04 +08:00
|
|
|
BitWriter
|
2016-03-01 23:56:53 +08:00
|
|
|
Core
|
|
|
|
Linker
|
2015-07-25 05:03:07 +08:00
|
|
|
Object
|
|
|
|
Option
|
2015-08-12 08:00:24 +08:00
|
|
|
MC
|
2015-07-25 05:03:07 +08:00
|
|
|
Support
|
2016-03-01 23:56:53 +08:00
|
|
|
Target
|
2016-02-29 03:50:14 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
|
|
|
lldConfig
|
2015-07-25 05:03:07 +08:00
|
|
|
)
|
|
|
|
|
2016-02-28 08:25:54 +08:00
|
|
|
add_dependencies(lldELF ELFOptionsTableGen)
|