Linux LTO with lld from llvm 9

Newbie2019 newbie2019 at
Thu Oct 10 08:44:32 UTC 2019

On Friday, 4 October 2019 at 09:54:44 UTC, kinke wrote:
> The problem here is that the produced bitcode is v9, but the 
> gold plugin is from LLVM v8.0.1. LDC v1.18.0-beta2 features the 
> v9 gold plugin; it'll probably also work when updating your 
> clang to v9.

Thanks for the explain.  I add `-gcc=clang -linker=lld 
--flto-binary=/opt/build/llvm/build/lib/` to ldc,  but 
ldc2 not pass into clang,  and the ld.lld still run 
with  `-plugin /usr/bin/../lib/`.  how could I use the 
new builded instead ?

On Friday, 4 October 2019 at 14:50:26 UTC, David Nadlinger wrote:
> Seems like you are trying to use LTO with LDC built against 
> LLVM 9.0, but the linker plugin (probably from clang) is built 
> against LLVM 8.0? The plugin [1] is separate from the linker 
> itself.
> should generally work fine. Perhaps others can chime in 
> as to what the current situation with LLD on Linux is; I 
> haven't tried it recently.

Thanks for the explain.

More information about the digitalmars-d-ldc mailing list