llvm/lld
John Ericson 07b749800c [cmake] Don't export LLVM_TOOLS_INSTALL_DIR anymore
First of all, `LLVM_TOOLS_INSTALL_DIR` put there breaks our NixOS
builds, because `LLVM_TOOLS_INSTALL_DIR` defined the same as
`CMAKE_INSTALL_BINDIR` becomes an *absolute* path, and then when
downstream projects try to install there too this breaks because our
builds always install to fresh directories for isolation's sake.

Second of all, note that `LLVM_TOOLS_INSTALL_DIR` stands out against the
other specially crafted `LLVM_CONFIG_*` variables substituted in
`llvm/cmake/modules/LLVMConfig.cmake.in`.

@beanz added it in d0e1c2a550 to fix a
dangling reference in `AddLLVM`, but I am suspicious of how this
variable doesn't follow the pattern.

Those other ones are carefully made to be build-time vs install-time
variables depending on which `LLVMConfig.cmake` is being generated, are
carefully made relative as appropriate, etc. etc. For my NixOS use-case
they are also fine because they are never used as downstream install
variables, only for reading not writing.

To avoid the problems I face, and restore symmetry, I deleted the
exported and arranged to have many `${project}_TOOLS_INSTALL_DIR`s.
`AddLLVM` now instead expects each project to define its own, and they
do so based on `CMAKE_INSTALL_BINDIR`. `LLVMConfig` still exports
`LLVM_TOOLS_BINARY_DIR` which is the location for the tools defined in
the usual way, matching the other remaining exported variables.

For the `AddLLVM` changes, I tried to copy the existing pattern of
internal vs non-internal or for LLVM vs for downstream function/macro
names, but it would good to confirm I did that correctly.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D117977
2022-07-21 19:04:00 +00:00
..
cmake/modules [cmake] Don't export LLVM_TOOLS_INSTALL_DIR anymore 2022-07-21 19:04:00 +00:00
COFF [LLD] [COFF] Improve the error message for too many exported symbols 2022-07-20 16:58:29 +03:00
Common
docs [lld-macho] Enable EH frame relocation / pruning 2022-07-13 21:14:05 -04:00
ELF Use value instead of getValue (NFC) 2022-07-15 20:03:13 -07:00
include/lld/Common [NFC][lld] Fix typos to test commit access 2022-06-24 00:19:18 +02:00
MachO [lld-macho] Fix LOH parsing segfault 2022-07-21 13:59:39 -04:00
MinGW [LLD] [MinGW] Implement --disable-reloc-section, mapped to /fixed 2022-06-15 16:51:20 +03:00
test [lld-macho] Fix LOH parsing segfault 2022-07-21 13:59:39 -04:00
tools/lld [LLD][ELF] Add FORCE_LLD_DIAGNOSTICS_CRASH to force LLD to crash 2022-07-05 09:43:09 +01:00
utils
wasm Use value instead of getValue (NFC) 2022-07-15 20:03:13 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [cmake] Don't export LLVM_TOOLS_INSTALL_DIR anymore 2022-07-21 19:04:00 +00:00
CODE_OWNERS.TXT
LICENSE.TXT
README.md

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.