This is motivated by https://reviews.llvm.org/D115852#3226050 where passing
LLVM_USE_LINKER in PASSTHROUGH_PREFIXES breaks cross-compilation
(e.g. targeting Windows on a Linux host). As suggested on that diff, implement
an override for it by allowing users to pass RUNTIMES_${target}_LLVM_USE_LINKER
to specify the linker for runtimes. Defaults to host linker if not specified.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
This still does not look right to me.
Shouldn't PASSTHROUGH_PREFIXES have just been removed in this invocation?
I want to cross build runtimes leaving the linker choice to the compiler driver, and not to set it on the command line to override the default [strange] choice of host linker.
Why would we ever want to use the linker that targets host to build runtimes for a target?
If someone wants to use host linker to build runtimes, they should specify it manually, not the opposite.
Do my words make sense or I'm talking nonsense? I'm quite new to runtimes build.
This might've been an oversight on my end. I think the choice to use the host linker to build for a target was to retain the previous behavior as close as possible while allowing the ability to override. Your situation seems to contradict this scenario unless you override specifically on the command line, which I can agree might not be desirable. Feel free to remove the default as long as existing builds all pass.
@thevinster
Thanks for the confirmation.
... as long as existing builds all pass.
That's what I'm afraid of. Let's see if I'm not the only one facing this issue. For now, I'll remove the check locally.