[PATCH] D115852: Passthrough LLVM_USE_LLD LLVM_USE_LINKER into runtimes
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 6 13:45:35 PST 2022
phosek added a comment.
In D115852#3226050 <https://reviews.llvm.org/D115852#3226050>, @smeenai wrote:
> I don't think this is correct when cross-compiling. For example, if you're cross-compiling for Windows on a Linux host and using gold as your Linux host linker, it doesn't make sense to also use gold for your Windows links. `PASSTHROUGH_PREFIXES` is also annoying because it's added last in the external project invocation (https://github.com/apple/llvm-project/blob/7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9/llvm/cmake/modules/LLVMExternalProjectUtils.cmake#L308-L309), so there's no way to override it. Is there an alternative solution that would work here while not breaking the cross-compilation case?
I think for the cross-compilation cases, we should use the same strategy we use for `LLVM_ENABLE_RUNTIMES` where we don't do passthrough if the variable name prefixed with the target is set. So if `RUNTIMES_x86_64-pc-windows-msvc_LLVM_USE_LLD` is set, we would pass through that one and not `LLVM_USE_LLD`. Do you think that would be sufficient?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115852/new/
https://reviews.llvm.org/D115852
More information about the llvm-commits
mailing list