arm/aarch64 output files in lld/test/ELF/Output are huge
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I keep my build directory on tmpfs, and `lld/test/ELF/Output` consumes a lot of space. After `check-lld-elf`
```
--- /tmp/Rel/tools/lld/test/ELF/Output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/..
384.0 MiB [############################################] /aarch64-cortex-a53-843419-thunk-relocation-crash.s.tmp
272.0 MiB [############################### ] /aarch64-long-thunk-converge.s.tmp
128.0 MiB [############## ] aarch64-thunk-reuse2.s.tmp
128.0 MiB [############## ] aarch64-thunk-reuse2.s.tmp.o
66.0 MiB [####### ] arm-thumb-mix-range-thunk-os.s.tmp
65.0 MiB [####### ] arm-thumb-mix-range-thunk-os.s.tmp2
64.0 MiB [####### ] arm-thunk-linkerscript-large.s.tmp
64.0 MiB [####### ] arm-thumb-plt-range-thunk-os.s.tmp
62.0 MiB [####### ] arm-thunk-linkerscript-large.s.tmp2
48.0 MiB [##### ] arm-thunk-largesection.s.tmp2
48.0 MiB [##### ] arm-thunk-largesection.s.tmp
34.0 MiB [### ] /hexagon-thunk-range-b22rel.s.tmp
34.0 MiB [### ] arm-thumb-range-thunk-os.s.tmp2
34.0 MiB [### ] arm-thunk-toolargesection.s.tmp
34.0 MiB [### ] arm-thumb-range-thunk-os.s.tmp
32.1 MiB [### ] ppc64-long-branch-localentry-offset.s.tmp
32.0 MiB [### ] arm-branch-undef-weak-plt-thunk.s.tmp
32.0 MiB [### ] arm-thunk-linkerscript-dotexpr.s.tmp2
32.0 MiB [### ] ppc64-long-branch-init.s.tmp
32.0 MiB [### ] ppc64-long-branch-init.s.tmp.o
32.0 MiB [### ] ppc64-long-branch-localentry-offset.s.tmp.o
32.0 MiB [### ] arm-branch-undef-weak-plt-thunk.s.tmp.o
31.0 MiB [### ] arm-thunk-linkerscript-sort.s.tmp2
31.0 MiB [### ] arm-thunk-linkerscript-sort.s.tmp
22.0 MiB [## ] /hexagon-thunk-range-plt.s.tmp
17.0 MiB [# ] arm-fix-cortex-a8-toolarge.s.tmp.o
17.0 MiB [# ] arm-thumb-condbranch-thunk.s.tmp.o
17.0 MiB [# ] arm-thunk-re-add.s.tmp
17.0 MiB [# ] arm-thunk-multipass.s.tmp
16.5 MiB [# ] arm-thunk-re-add.s.tmp.so
16.5 MiB [# ] arm-thumb-condbranch-thunk.s.tmp
16.0 MiB [# ] arm-fix-cortex-a8-thunk-align.s.tmp2
16.0 MiB [# ] arm-fix-cortex-a8-thunk-align.s.tmp.o
16.0 MiB [# ] arm-thunk-multipass.s.tmp2
16.0 MiB [# ] arm-thunk-many-passes.s.tmp2
16.0 MiB [# ] hexagon-thunks-packets.s.tmp
16.0 MiB [# ] arm-thunk-many-passes.s.tmp
16.0 MiB [# ] arm-thumb-thunk-empty-pass.s.tmp
16.0 MiB [# ] hexagon-thunks-packets.s.tmp.o
16.0 MiB [# ] arm-thumb-thunk-empty-pass.s.tmp.o
16.0 MiB [# ] arm-long-thunk-converge.s.tmp
14.0 MiB [# ] arm-thunk-nosuitable.s.tmp
14.0 MiB [# ] arm-thunk-nosuitable.s.tmp.o
13.0 MiB [# ] arm-thunk-multipass-plt.s.tmp
12.0 MiB [# ] arm-thunk-multipass-plt.s.tmp2
12.0 MiB [# ] arm-thumb-range-thunk-os-no-ext.s.tmp2
12.0 MiB [# ] arm-thumb-range-thunk-os-no-ext.s.tmp.o
```
We should utilize the output section address feature to optimize and shrink our output files, or delete the files preemptively.
@smithp35
Contributor guide
Research direction
Start with lld/test/ELF/Output and the check-lld-elf test entry point, using the listed large .tmp and .o files to identify which tests produce them. Determine whether output-section addressing or preemptive cleanup is appropriate, and verify that check-lld-elf still passes while the generated files use substantially less space.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100