Which shell variables using lld linker from llvm project? There is shell variable that…
- User
Which shell variables using lld linker from llvm project? There is shell variable that control build-id generation?
- Assistant
In the LLVM project, the lld linker does not use any special shell variables by default. However, there are a few environment variables that can be used to modify the linker's behavior.
One important environment variable is
LD, which specifies the path to the linker executable. By setting this variable, you can use a specific version of lld for your builds.Regarding build-id generation, by default, lld does not generate build-IDs for ELF executables. However, if you want to enable build-id generation, you can set the
LD_BUILD_IDenvironment variable to a non-empty value. This will cause lld to generate a build-ID for the output file.Example:
codeexport LD=ld.lld export LD_BUILD_ID=1This will use the lld linker and enable build-id generation for your builds.