The MinGW driver for lld does not support the --version-script option.
For GNU ld, it's a no-op since LLVM.dll exports all symbols.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'd suggest skipping the lld condition, the version script adds no value here.
For ELF, version scripts do two things, select what symbols to export using glob pattetns, and set symbol versions on them.
As COFF doesn't have symbol versions, all it does on mingw with GNU ld, is filtering symbols, to export *. So it adds no value there.
(I don't remember if cmake even knows the linker is lld in my mingw setups.)
I thought so - that -version-script is not needed for Windows but wanted to leave it just in case GNU ld did something with it. I'll skip this option altogether for MinGW unless someone suggests otherwise.
(I don't remember if cmake even knows the linker is lld in my mingw setups.)
It does know - LINKER_IS_LLD_LINK is set at the top of llvm/cmake/modules/HandleLLVMOptions.cmake.