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-12-12 13:47:40 +08:00
|
|
|
if(NOT LLD_BUILT_STANDALONE)
|
|
|
|
set(tablegen_deps intrinsics_gen)
|
|
|
|
endif()
|
|
|
|
|
2016-02-28 08:25:54 +08:00
|
|
|
add_lld_library(lldELF
|
2017-12-05 23:59:05 +08:00
|
|
|
AArch64ErrataFix.cpp
|
2017-06-17 01:32:43 +08:00
|
|
|
Arch/AArch64.cpp
|
|
|
|
Arch/AMDGPU.cpp
|
|
|
|
Arch/ARM.cpp
|
|
|
|
Arch/AVR.cpp
|
2018-06-14 02:45:25 +08:00
|
|
|
Arch/Hexagon.cpp
|
2017-06-17 01:32:43 +08:00
|
|
|
Arch/Mips.cpp
|
2017-06-20 05:03:57 +08:00
|
|
|
Arch/MipsArchTree.cpp
|
2019-01-10 21:43:06 +08:00
|
|
|
Arch/MSP430.cpp
|
2017-06-17 01:32:43 +08:00
|
|
|
Arch/PPC.cpp
|
|
|
|
Arch/PPC64.cpp
|
2018-08-10 01:59:56 +08:00
|
|
|
Arch/RISCV.cpp
|
2017-06-29 01:05:39 +08:00
|
|
|
Arch/SPARCV9.cpp
|
2017-06-17 01:32:43 +08:00
|
|
|
Arch/X86.cpp
|
|
|
|
Arch/X86_64.cpp
|
2018-04-18 07:30:05 +08:00
|
|
|
CallGraphSort.cpp
|
2018-09-15 07:51:05 +08:00
|
|
|
DWARF.cpp
|
2015-07-25 05:03:07 +08:00
|
|
|
Driver.cpp
|
|
|
|
DriverUtils.cpp
|
2016-05-24 10:55:45 +08:00
|
|
|
EhFrame.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
|
2016-03-23 04:52:10 +08:00
|
|
|
LTO.cpp
|
2015-10-01 01:23:26 +08:00
|
|
|
LinkerScript.cpp
|
2017-01-14 05:05:46 +08:00
|
|
|
MapFile.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
|
2016-05-25 04:24:43 +08:00
|
|
|
Relocations.cpp
|
2017-02-14 12:47:05 +08:00
|
|
|
ScriptLexer.cpp
|
2017-04-05 13:07:39 +08:00
|
|
|
ScriptParser.cpp
|
2015-07-25 05:03:07 +08:00
|
|
|
SymbolTable.cpp
|
|
|
|
Symbols.cpp
|
2016-11-02 04:28:21 +08:00
|
|
|
SyntheticSections.cpp
|
2015-09-23 02:19:46 +08:00
|
|
|
Target.cpp
|
2016-07-09 00:10:27 +08:00
|
|
|
Thunks.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}
|
2017-06-08 02:06:11 +08:00
|
|
|
BinaryFormat
|
2018-05-03 18:03:45 +08:00
|
|
|
BitWriter
|
2016-03-01 23:56:53 +08:00
|
|
|
Core
|
2016-10-21 15:46:24 +08:00
|
|
|
DebugInfoDWARF
|
2016-06-23 02:09:23 +08:00
|
|
|
LTO
|
2017-10-12 07:18:43 +08:00
|
|
|
MC
|
2015-07-25 05:03:07 +08:00
|
|
|
Object
|
|
|
|
Option
|
|
|
|
Support
|
2016-02-29 03:50:14 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
2017-10-03 05:00:41 +08:00
|
|
|
lldCommon
|
2017-02-10 09:59:20 +08:00
|
|
|
${LLVM_PTHREAD_LIB}
|
2015-07-25 05:03:07 +08:00
|
|
|
|
2016-11-17 12:36:35 +08:00
|
|
|
DEPENDS
|
|
|
|
ELFOptionsTableGen
|
2016-12-12 13:47:40 +08:00
|
|
|
${tablegen_deps}
|
2016-11-17 12:36:35 +08:00
|
|
|
)
|