[compiler-rt] Check if LLD is built when checking if lto_supported (PR #92752)

Jan Voung via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 08:05:24 PDT 2024


jvoung wrote:

Thanks for the info Vitaly!

Do you remember any of the example tests that were not being executed but should have been and bots (or configuration) to double check?

Did the tests only want the freshly built LLD, and somehow the `LLVM_TOOL_LLD_BUILD` part wasn't sufficient? Or did the tests want to allow system LLD (but were not testing LTO)?

I'm not sure whether `LLVM_TOOL_LLD_BUILD` is sufficiently different from the `use_lld` in `llvm/utils/lit/lit/llvm/config.py`. It seems to roughly search:

```
self.config.name.lower() + "_tools_dir",
            "lld_tools_dir",
            "llvm_tools_dir",
```
`lld_tools_dir` doesn't seem to be bound in the compiler-rt, and `config.name` is `<unnamed>`, so if we use that it would just be checking `llvm_tools_dir` IIUC. I'm also assuming the `use_installed` parameter is false, since we don't want that.
And it sets LD_LIBRARY_PATH, but that hasn't seemed to have been a problem for compiler-rt so far?

====

Otherwise, is there a strong reason to have `lld-available` imply  `lto_supported` and not decouple? Is the concern that this was already assumed in a lot of places and we'd need to inform people that it's decoupled?

https://github.com/llvm/llvm-project/pull/92752


More information about the llvm-commits mailing list