mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 14:16:08 +00:00

Port COFF's https://reviews.llvm.org/D78221 and https://reviews.llvm.org/D137217 to ELF. For the in-process ThinLTO link, `ld.lld --save-temps a.o d/b.o -o out` will create ELF relocatable files `out.lto.a.o`/`d/out.lto.b.o` instead of `out1.lto.o`/`out2.lto.o`. Deriving the LTO-generated relocatable file name from bitcode file names helps debugging. The relocatable file name from the first regular LTO partition does not change: `out.lto.o`. The second, if present due to `--lto-partition=`, changes from `out1.lto.o` to `lto.1.o`. For an archive member, e.g. `d/a.a(coll.o at 8)`, the relocatable file is `d/out.lto.a.a(coll.o at 8).o`. `--lto-emit-asm` file names are changed similarly. `--lto-emit-asm -o out` now creates `out.lto.s` instead of `out`, therefore the `--lto-emit-asm -o -` idiom no longer works. However, I think this new behavior (which matches COFF) is better since keeping or removing `--lto-emit-asm` will dump different files, instead of overwriting the `-o` output file from an executable/shared object to an assembly file. Reviewers: rnk, igorkudrin, xur-llvm, teresajohnson, ZequanWu Reviewed By: teresajohnson Pull Request: https://github.com/llvm/llvm-project/pull/78835
LLVM Linker (lld)
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
Benchmarking
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.